Build iOS #74
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build iOS | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version Overwrite | |
| required: false | |
| push: | |
| tags: | |
| - "v*" | |
| pull_request: | |
| env: | |
| VERSION: ${{ github.event.inputs.version || (startsWith(github.ref, 'refs/tags/') && github.ref || '') }} | |
| jobs: | |
| binding: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '^1.24' | |
| - name: Build Go | |
| run: ./go.sh 1.24.1 fastrsa | |
| - name: Build | |
| run: | | |
| export PATH="/tmp/go/bin:$PATH" | |
| export GOTOOLCHAIN=local | |
| make binding_ios | |
| - name: Compress | |
| run: tar -czvf output.tar.gz -C output/binding/ios . | |
| - if: ${{ env.VERSION!='' }} | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| asset_name: librsa_bridge_ios_$tag.tar.gz | |
| file: output.tar.gz | |
| tag: ${{ env.VERSION }} | |
| overwrite: true | |
| - if: ${{ env.VERSION=='' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: librsa_bridge_ios | |
| path: output.tar.gz | |
| xcframework: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '^1.24' | |
| - name: Build Go | |
| run: ./go.sh 1.24.1 fastrsa | |
| - name: Build | |
| run: | | |
| export PATH="/tmp/go/bin:$PATH" | |
| export GOTOOLCHAIN=local | |
| make binding_ios_xcframework | |
| - name: Compress | |
| run: tar -czvf output.tar.gz -C output/binding/ios . | |
| - if: ${{ env.VERSION!='' }} | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| asset_name: librsa_bridge_ios_xcframework_$tag.tar.gz | |
| file: output.tar.gz | |
| tag: ${{ env.VERSION }} | |
| overwrite: true | |
| - if: ${{ env.VERSION=='' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: librsa_bridge_ios_xcframework | |
| path: output.tar.gz |