-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a1cb14
commit 2034d68
Showing
1 changed file
with
86 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,67 +21,101 @@ jobs: | |
config-file: ci/release-please-config.json | ||
manifest-file: ci/.release-please-manifest.json | ||
|
||
release-android-example-app: | ||
sync-version: | ||
needs: release-please | ||
if: ${{ needs.release-please.outputs.release-created }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: example | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- uses: subosito/flutter-action@v2 | ||
- name: Read version from root pubspec | ||
id: read-version | ||
uses: NiklasLehnfeld/flutter-version-number-action@v1 | ||
with: | ||
channel: stable | ||
cache: true | ||
file-path: ./pubspec.yaml | ||
|
||
- uses: actions/setup-java@v4 | ||
- name: Update pubspec in example app | ||
uses: Dbono-dev/[email protected] | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
cache: "gradle" | ||
changes: | | ||
{ | ||
"version": "${{ steps.read-version.outputs.version-number }}" | ||
} | ||
commentOutDevDependencies: "false" | ||
|
||
- name: Make secret env file accessible for envied generation. | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: ".env" | ||
fileDir: "./example" | ||
encodedString: ${{ secrets.EXAMPLE_APP_ENV_FILE_PROD_BASE64 }} | ||
- uses: actions4git/setup-git@v1 | ||
name: Setup git | ||
- name: Commit changes | ||
run: | | ||
git add example/pubspec.yaml | ||
git commit -m "Release v${{ steps.read-version.outputs.version-number }}" | ||
git push | ||
- name: Write Keystore from base64 encoded secret. | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: "sbb_maps_flutter_example_keystore.jks" | ||
fileDir: "./example/android/app/keys" | ||
encodedString: ${{ secrets.ANDROID_KEYSTORE_64 }} | ||
|
||
- run: flutter pub get | ||
- run: dart run build_runner build --delete-conflicting-outputs | ||
- run: flutter build appbundle --no-pub | ||
env: | ||
SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | ||
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | ||
|
||
- name: Create Signing Report | ||
run: ./gradlew signingReport | ||
working-directory: ./example/android | ||
|
||
- name: Upload appbundle as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-release.aab | ||
path: example/build/app/outputs/bundle/release/ | ||
retention-days: 3 | ||
# match-example-app: | ||
|
||
- name: Write Google SA json from base64 encoded secret | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: "google_playstore_service_account.json" | ||
fileDir: "./example/android/app/keys" | ||
encodedString: ${{ secrets.GOOGLE_PLAYSTORE_SERVICE_ACCOUNT_BASE64 }} | ||
# release-android-example-app: | ||
# needs: release-please | ||
# if: ${{ needs.release-please.outputs.release-created }} | ||
# runs-on: ubuntu-latest | ||
# defaults: | ||
# run: | ||
# working-directory: example | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
|
||
# - uses: subosito/flutter-action@v2 | ||
# with: | ||
# channel: stable | ||
# cache: true | ||
|
||
# - uses: actions/setup-java@v4 | ||
# with: | ||
# java-version: "17" | ||
# distribution: "temurin" | ||
# cache: "gradle" | ||
|
||
# - name: Make secret env file accessible for envied generation. | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: ".env" | ||
# fileDir: "./example" | ||
# encodedString: ${{ secrets.EXAMPLE_APP_ENV_FILE_PROD_BASE64 }} | ||
|
||
# - name: Write Keystore from base64 encoded secret. | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: "sbb_maps_flutter_example_keystore.jks" | ||
# fileDir: "./example/android/app/keys" | ||
# encodedString: ${{ secrets.ANDROID_KEYSTORE_64 }} | ||
|
||
# - run: flutter pub get | ||
# - run: dart run build_runner build --delete-conflicting-outputs | ||
# - run: flutter build appbundle --no-pub | ||
# env: | ||
# SIGNING_KEYSTORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} | ||
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | ||
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | ||
|
||
# - name: Create Signing Report | ||
# run: ./gradlew signingReport | ||
# working-directory: ./example/android | ||
|
||
# - name: Upload appbundle as artifact | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: app-release.aab | ||
# path: example/build/app/outputs/bundle/release/ | ||
# retention-days: 3 | ||
|
||
# - name: Write Google SA json from base64 encoded secret | ||
# uses: timheuer/[email protected] | ||
# with: | ||
# fileName: "google_playstore_service_account.json" | ||
# fileDir: "./example/android/app/keys" | ||
# encodedString: ${{ secrets.GOOGLE_PLAYSTORE_SERVICE_ACCOUNT_BASE64 }} | ||
|
||
- name: Release using Google Play Publisher | ||
run: ./gradlew publishBundle --artifact-dir ../build/app/outputs/bundle/release/ | ||
working-directory: ./example/android | ||
# - name: Release using Google Play Publisher | ||
# run: ./gradlew publishBundle --artifact-dir ../build/app/outputs/bundle/release/ | ||
# working-directory: ./example/android |