Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Properly Fill Release Info
Browse files Browse the repository at this point in the history
  • Loading branch information
Teifun2 committed Aug 20, 2023
1 parent 674fe45 commit 76e1918
Showing 1 changed file with 40 additions and 22 deletions.
62 changes: 40 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,60 @@ jobs:
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
architecture: x64
# - name: 🔐 Retrieve base64 keystore and decode it to a file
# env:
# KEYSTORE_BASE64: ${{ secrets.ANDROID_SIGNING_KEY }}
# run: sudo bash -c 'base64 --decode <<< "$KEYSTORE_BASE64" > ${{ github.workspace }}/android/app/key.jks'
# - name: 📝🔐 Create keystore.properties file
# env:
# KEYSTORE_PROPERTIES_PATH: ${{ github.workspace }}/android/key.properties
# run: |
# echo '${{ inputs.flavor }}StoreFile=key.jks' > $KEYSTORE_PROPERTIES_PATH
# echo '${{ inputs.flavor }}KeyAlias=${{ secrets.ANDROID_KEY_ALIAS }}' >> $KEYSTORE_PROPERTIES_PATH
# echo '${{ inputs.flavor }}StorePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
# echo '${{ inputs.flavor }}KeyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
# This is seems to be only needed when running github actions locally with act
# - run: git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.13.0-x64
- run: flutter pub get
- name: 📥 Downloading Dependencies
run: flutter pub get
# There are many issues currently that first need to be fixed to allow this rule
# - run: flutter analyze --fatal-infos ./
- run: dart format -o show --set-exit-if-changed ./
- run: flutter test
- run: flutter build apk
- run: flutter build appbundle
- name: 📝 Format
run: dart format -o show --set-exit-if-changed ./
- name: 🧪 Testing
run: flutter test
- name: 🛠️ Build APK
run: flutter build apk
- name: 🛠️ Build AppBundle
run: flutter build appbundle
- name: 🔐 Sign app APK
uses: r0adkll/sign-android-release@v1
# ID used to access action output
id: sign_app_apk
with:
releaseDirectory: ${{ github.workspace }}/build/app/outputs/apk/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
# env:
# # override default build-tools version (29.0.3) -- optional
# BUILD_TOOLS_VERSION: "30.0.2"
- name: 🔐 Sign app AAB
uses: r0adkll/sign-android-release@v1
id: sign_app_aab
with:
releaseDirectory: ${{ github.workspace }}/build/app/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
- name: 🗃️ Rename the Release File
uses: canastro/copy-file-action@master
with:
source: "${{ steps.sign_app_apk.outputs.signedReleaseFile }}"
target: "${{ github.workspace }}/app-release.apk"
- name: 📄 Extract Version Number
id: flutter-version
uses: NiklasLehnfeld/flutter-version-number-action@main
with:
file-path: ${{ github.workspace }}/pubspec.yaml
- name: ✂️ Split Version Number
uses: jungwinter/split@v1
id: flutter-version-split
with:
msg: ${{ steps.flutter-version.outputs.version-number }}
separator: '+'
- name: ⬆️ Github Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.flutter-version-split._0 }}
tag_name: ${{ steps.flutter-version-split._0 }}
body_path: ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/${{ steps.flutter-version-split._1 }}.txt
draft: true
files: ${{ steps.sign_app_apk.outputs.signedReleaseFile }}
files: "${{ github.workspace }}/app-release.apk"
fail_on_unmatched_files: true

0 comments on commit 76e1918

Please sign in to comment.