ci: set up automatic build for iOS #14
Workflow file for this run
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 app" | |
| on: | |
| pull_request: | |
| push: | |
| env: | |
| GO_VERSION: "~1.24.0" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| attestations: write | |
| jobs: | |
| build_with_signing: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Check Xcode version | |
| run: | | |
| /usr/bin/xcodebuild -version | |
| sudo /usr/bin/xcode-select -switch /Applications/Xcode_16.2.app/Contents/Developer | |
| /usr/bin/xcodebuild -version | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Obtain certificate | |
| env: | |
| BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
| run: | | |
| echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o "./Assets/developer-certificate.p12" | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false | |
| check-latest: true | |
| - name: Make ipa | |
| env: | |
| P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
| run: | | |
| make ipa | |
| - name: Upload application | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app | |
| path: ./Build | |
| retention-days: 3 | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v2 | |
| with: | |
| subject-path: ./Build/synctrain.ipa |