Skip to content

v1.55-rc3 release draft #254

v1.55-rc3 release draft

v1.55-rc3 release draft #254

Workflow file for this run

name: Build store iOS project
on:
release:
types: [published]
jobs:
build-ios:
name: Build iOS
strategy:
fail-fast: false
matrix:
org: [atb, nfk, fram, troms]
environment: ${{ matrix.org }}
timeout-minutes: 360
runs-on: macOS-13
steps:
- name: Check if release tag is org specific and exit for other orgs
if: ${{ (contains(github.ref, 'atb') && matrix.org != 'atb') ||
(contains(github.ref, 'nfk') && matrix.org != 'nfk') ||
(contains(github.ref, 'fram') && matrix.org != 'fram') ||
(contains(github.ref, 'troms') && matrix.org != 'troms') }}
run: exit 1
- name: Checkout project
uses: actions/checkout@v3
- name: Add Entur private registry credentials
run: sh ./scripts/add-entur-private-registry.sh
env:
ENTUR_REGISTRY_USER: ${{ vars.ENTUR_REGISTRY_USER }}
ENTUR_REGISTRY_TOKEN: ${{ secrets.ENTUR_REGISTRY_TOKEN }}
- name: Setup build dependencies, environment and assets
uses: ./.github/actions/ios-build-setup
with:
use-build-cache: 'false'
app-environment: 'store'
app-org: ${{ matrix.org }}
git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }}
- uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
- name: Generate native assets
run: |
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.12'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.12'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.12'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.12'
rm '/usr/local/bin/python3.12-config'
rm '/usr/local/bin/2to3-3.11'
rm '/usr/local/bin/idle3.11'
rm '/usr/local/bin/pydoc3.11'
rm '/usr/local/bin/python3.11'
rm '/usr/local/bin/python3.11-config'
brew install imagemagick
yarn generate-native-assets
- name: Disable widget
if: ${{ env.ENABLE_WIDGET != 'true' }}
run: bundle exec configure_extensions remove ios/atb.xcodeproj app departureWidget AtbAppIntent
- name: Enable apple pass suppression
if: ${{ env.ENABLE_APPLE_PASS_SUPPRESSION == 'true' }}
run: bundle exec fastlane ios enable_pass_presentation_suppression_entitlement
- name: Remove use of beacons
if: ${{ env.KETTLE_API_KEY == '' }}
run: bundle exec fastlane ios remove_use_of_beacons
- name: Run fastlane build
run: bundle exec fastlane ios build
env:
# A workaround for Github Actions which breaks for a timeout in some cases,
# so this sets a higher value for TIMEOUT and reduces the number of retries
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 180
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 1
EXPORT_METHOD: 'app-store'
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
- name: Distribute to TestFlight
run: |
echo ${{ secrets.APP_STORE_CONNECT_API_KEY}} | base64 --decode > app-store-connect-api-key.json
bundle exec fastlane ios testflight_prod
env:
APPCONNECT_API_KEY_PATH: app-store-connect-api-key.json
- name: Create bundle and source maps
run: sh ./scripts/ios/create-sourcemaps.sh
- name: Upload bundle and source maps
run: sh ./scripts/ios/upload-sourcemaps.sh
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
- name: Upload dSYMs
run: sh ./scripts/ios/upload-dsyms.sh
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
- name: Register app version
run: sh ./scripts/ios/register-app-version.sh
env:
ENTUR_PUBLISH_CLIENT: ${{ secrets.ABT_ENTUR_PUBLISH_CLIENT_PRODUCTION}}