build(deps): bump cycjimmy/semantic-release-action from 3.4.2 to 4.0.… #6356
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: Dev builds | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
pull_request: | |
branches: | |
- master | |
- beta | |
jobs: | |
android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: "11" | |
- uses: subosito/[email protected] | |
with: | |
channel: stable | |
cache: true | |
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache | |
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
architecture: x64 # optional, x64 or arm64 | |
- name: Install keystore and Firebase keys | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }} | |
run: | | |
echo $KEYSTORE | base64 -di > android/keystore.jks | |
echo $FIREBASE_OPTIONS | base64 --decode > lib/firebase_options.dart | |
- name: Build app | |
env: | |
KEYSTOREPASS: ${{ secrets.KEYSTOREPASS }} | |
run: flutter build apk --flavor dev -t lib/main_dev.dart --split-per-abi | |
- name: Uploade artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: android-test-artifacts | |
path: "build/app/outputs/flutter-apk/app-*-dev-release.apk" | |
ios: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Apple certificate and provisioning profile | |
env: | |
APPSTORE_CERT: ${{ secrets.APPSTORE_CERT }} | |
APPSTORE_CERT_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }} | |
MOBILEPROVISION: ${{ secrets.MOBILEPROVISION }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$APPSTORE_CERT" | base64 --decode --output $CERTIFICATE_PATH | |
echo -n "$MOBILEPROVISION" | base64 --decode --output $PP_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 "$APPSTORE_CERT_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
# apply provisioning profile | |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | |
- uses: subosito/[email protected] | |
with: | |
channel: stable | |
cache: true | |
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache | |
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
architecture: x64 # optional, x64 or arm64 | |
- name: Setup Firebase | |
env: | |
FIREBASE_IOS: ${{ secrets.FIREBASE_IOS }} | |
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }} | |
run: | | |
echo $FIREBASE_IOS | base64 --decode > ios/firebase_app_id_file.json | |
echo $FIREBASE_OPTIONS | base64 --decode > lib/firebase_options.dart | |
- name: Build app | |
run: flutter build ipa -t lib/main_dev.dart --export-options-plist=ios/ExportOptions.plist | |
- name: Uploade artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ios-test-artifact | |
path: "build/ios/ipa/*.ipa" | |
# Only needed for self-hosted runners but I'm a paraniod person. | |
- name: Clean up keychain and provisioning profile | |
if: ${{ always() }} | |
run: | | |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db | |
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision |