let flutter suck #969
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
name: Flutter macOS | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build_macos: | |
name: Build | |
# This job is known to fail. | |
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 config --enable-macos-desktop | |
- name: Download Development Profile | |
uses: apple-actions/download-provisioning-profiles@v1 | |
with: | |
bundle-id: io.jonline.jonline | |
profile-type: MAC_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: MAC_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 | |
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, provisioning profile and export options 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 | |
- working-directory: frontends/flutter | |
run: flutter build macos --release | |
- run: ls -R /Users/runner/work/jonline/jonline/frontends/flutter/build/macos | |