Skip to content

upgrade tamagui and move settings sheet to its own context #1035

upgrade tamagui and move settings sheet to its own context

upgrade tamagui and move settings sheet to its own context #1035

Workflow file for this run

# To generate your own keys:
#
# 0) Use Keychain Access to generate a certSigningRequest/CSR (if one isn't saved).
# 1) Create iOS Development Cert (ios_development.cer) using the CSR:
# https://developer.apple.com/account/resources/certificates/list
# 2) Create iOS Development Provisioning Profile using the cert from (1):
# https://developer.apple.com/account/resources/profiles/list
# 3) Do (1) but for iOS Distribution/"App Store/Ad Hoc" (ios_distribution.cer)
# 4) Do (2) but for iOS Distribution/"App Store/Ad Hoc" using the cert from (3).
# 5) Install those new ios_development.cer and ios_distribution.cer in Keychain Access, in your "login" keychain.
# Find them in the confusing UI and select both, right-click, "Export 2 Items" to generate
# the Certificates.p12 with a password.
# 6) Store the password from step (5) in the IOS_P12_DISTRIBUTION_CERTIFICATE_PASSWORD secret.
# Base64-encode (base64 -i) your Certificates.p12 from step (5) into the IOS_P12_DISTRIBUTION_CERTIFICATE_BASE64 secret,
# and your .mobileprovision files from steps (2) and (4) into IOS_DEVELOPMENT_PROVISIONING_PROFILE_BASE64
# and IOS_DISTRIBUTION_PROVISIONING_PROFILE_BASE64.
# 7) You'll also need to setup Apple Developer account API keys for
# APP_STORE_CONNECT_ISSUER_ID, APP_STORE_CONNECT_API_KEY_ID,
# and APP_STORE_CONNECT_API_PRIVATE_KEY (all plaintext). This
# is available here: https://appstoreconnect.apple.com/access/api under
# "Keys" -> "App Store Connect API" currently (the Issuer ID is on the page itself).
name: Flutter iOS
on:
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
jobs:
build_ios:
name: Build (➡️TestFlight on Version Update)
# continue-on-error: true
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- working-directory: frontends/flutter
run: flutter pub get
- name: Download Development Profile
uses: apple-actions/download-provisioning-profiles@v1
with:
bundle-id: io.jonline.jonline
profile-type: IOS_APP_DEVELOPMENT
issuer-id: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
api-key-id: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
api-private-key: ${{ secrets.APP_STORE_CONNECT_API_PRIVATE_KEY }}
- name: Download Distribution Profile
id: provisioning
uses: apple-actions/download-provisioning-profiles@v1
with:
bundle-id: io.jonline.jonline
profile-type: IOS_APP_STORE
issuer-id: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
api-key-id: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
api-private-key: ${{ secrets.APP_STORE_CONNECT_API_PRIVATE_KEY }}
- working-directory: frontends/flutter
run: flutter build ios --release --no-codesign
- working-directory: frontends/flutter
name: 🔐 Install Apple certificates
env:
P12_DISTRIBUTION_CERTIFICATE_BASE64: "${{ secrets.IOS_P12_DISTRIBUTION_CERTIFICATE_BASE64 }}"
P12_DISTRIBUTION_CERTIFICATE_PASSWORD: "${{ secrets.IOS_P12_DISTRIBUTION_CERTIFICATE_PASSWORD }}"
KEYCHAIN_PASSWORD: "${{ secrets.IOS_RUNNER_LOCAL_KEYCHAIN_PASSWORD }}"
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate from secrets
echo -n "$P12_DISTRIBUTION_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_DISTRIBUTION_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- run: ls ~/Library/MobileDevice/Provisioning\ Profiles
- working-directory: frontends/flutter
name: 🍏📦 Create iOS Jonline appbundle release
run: |
flutter build ipa --release --export-options-plist=ios/exportOptions.plist
# - run: ls -R /Users/runner/work/jonline/jonline/frontends/flutter/build/ios
- name: 🍏🚀 Deploy to TestFlight (on pubspec.yaml version increment; fail otherwise)
continue-on-error: true
uses: apple-actions/upload-testflight-build@v1
with:
app-path: ${{ github.workspace }}/frontends/flutter/build/ios/ipa/jonline.ipa
issuer-id: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
api-key-id: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
api-private-key: ${{ secrets.APP_STORE_CONNECT_API_PRIVATE_KEY }}