ci: Temp hard-code latest_build_number #6
This file contains 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
# See https://www.runway.team/blog/how-to-set-up-a-ci-cd-pipeline-for-your-ios-app-fastlane-github-actions | |
name: Build iOS and upload to Testflight | |
on: | |
push: | |
branches: ["dev"] | |
jobs: | |
deploy: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
ruby-version: [3.3] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: "Set login password for downloading mapbox SDK" | |
uses: extractions/netrc@v2 | |
with: | |
machine: api.mapbox.com | |
username: mapbox | |
password: ${{ secrets.MAPBOX_SDK_REGISTRY_TOKEN }} | |
- run: npm ci | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
working-directory: ios | |
- name: Look for cached Pods | |
uses: actions/cache@v4 | |
with: | |
path: ios/Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: CocoaPod Install | |
working-directory: ios | |
run: pod install | |
- name: Decode signing certificate into a file | |
working-directory: ios | |
env: | |
CERTIFICATE_BASE64: ${{ secrets.IOS_DIST_SIGNING_KEY }} | |
run: | | |
echo $CERTIFICATE_BASE64 | base64 --decode > signing-cert.p12 | |
- name: Build & upload iOS binary | |
working-directory: ios | |
run: bundle exec fastlane ios build_beta_upload_testflight | |
env: | |
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} | |
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | |
ASC_KEY: ${{ secrets.ASC_PRIVATE_KEY }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }} | |
SIGNING_KEY_FILE_PATH: signing-cert.p12 | |
- name: Upload app-store ipa and dsyms to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-store ipa & dsyms | |
path: | | |
${{ github.workspace }}/ios/OneBoulder-iOS.ipa | |
${{ github.workspace }}/ios/*.app.dSYM.zip |