Skip to content

version 4.1.4

version 4.1.4 #98

Workflow file for this run

name: Jasstafel CD
on:
push:
tags:
- "*"
branches:
- flutter_ci
# cspell:disable
jobs:
build-android:
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Check out submodule
run: git submodule update --init --force
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17.x"
cache: "gradle"
- name: Get dependencies
run: flutter/bin/flutter pub get
- name: Generate icons
run: flutter/bin/flutter pub run flutter_launcher_icons
- name: Generate translations
run: flutter/bin/flutter gen-l10n
- name: Generate sources
run: flutter/bin/flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter/bin/flutter build appbundle
- name: Sign App Bundle
uses: ilharp/sign-android-release@v1
with:
releaseDir: build/app/outputs/bundle/release/
signingKey: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
keyAlias: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
buildToolsVersion: 34.0.0
- name: Android app bundle artifact
uses: actions/upload-artifact@v4
with:
name: bundle
path: |
build/app/outputs/bundle/release/app-release-signed.aab
build/app/outputs/mapping/release/mapping.txt
build/app/intermediates/merged_native_libs/release/out/lib
release-android:
needs: [build-android, build-ios]
runs-on: macos-latest
steps:
- name: Get release-bundle from artifacts
uses: actions/download-artifact@v4
with:
name: bundle
- name: Upload to Play Store (Beta Testing)
uses: r0adkll/upload-google-play@v1.1.2
with:
serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
packageName: ch.simonste.jasstafel
releaseFiles: outputs/bundle/release/app-release-signed.aab
mappingFile: outputs/mapping/release/mapping.txt
debugSymbols: intermediates/merged_native_libs/release/out/lib
track: beta
build-ios:
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Check out submodule
run: git submodule update --init --force
- name: Setup xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.3.0"
- name: Get dependencies
run: flutter/bin/flutter pub get
- name: Generate icons
run: flutter/bin/flutter pub run flutter_launcher_icons
- name: Generate translations
run: flutter/bin/flutter gen-l10n
- name: Generate sources
run: flutter/bin/flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Install the Apple certificate
uses: apple-actions/import-codesign-certs@master
with:
p12-file-base64: ${{ secrets.P12_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
- name: Install the provisioning profile
env:
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
run: |
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Build
run: |
flutter/bin/flutter build ipa --release --export-options-plist=ios/Runner/ExportOptions.plist
- name: ipa artifact
uses: actions/upload-artifact@v4
with:
name: ipa
path: build/ios/ipa/*.ipa
release-ios:
needs: [build-android, build-ios]
runs-on: macos-latest
steps:
- name: Get release-ipa from artifacts
uses: actions/download-artifact@v4
with:
name: ipa
- name: Install API Key
env:
API_KEY: ${{ secrets.APPSTORE_API_KEY_ID }}
APPSTORE_API_PRIVATE_KEY_BASE64: ${{ secrets.APPSTORE_API_PRIVATE_KEY_BASE64 }}
run: |
mkdir ~/private_keys
echo -n "$APPSTORE_API_PRIVATE_KEY_BASE64" | base64 --decode -o ~/private_keys/AuthKey_$API_KEY.p8
- name: upload app
env:
API_KEY: ${{ secrets.APPSTORE_API_KEY_ID }}
API_ISSUER: ${{ secrets.APPSTORE_ISSUER_ID }}
APP_PATH: "*.ipa"
run: |
xcrun altool --validate-app -f $APP_PATH -t ios --apiKey $API_KEY --apiIssuer $API_ISSUER
xcrun altool --upload-app -f $APP_PATH -t ios --apiKey $API_KEY --apiIssuer $API_ISSUER