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

Commit

Permalink
Added Publish YML
Browse files Browse the repository at this point in the history
  • Loading branch information
Teifun2 committed Aug 20, 2023
1 parent 21e80dd commit c8ac1b9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
architecture: x64
# 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
# - run: flutter analyze --fatal-infos ./
- run: dart format -o none --set-exit-if-changed ./
# 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
- run: flutter build apk --debug
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Publish"
on:
workflow_dispatch:
jobs:
publish-android:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: ⚙️ Setup Java
uses: actions/setup-java@v3
with:
java-version: '12.x'
distribution: 'adopt'
cache: 'gradle'
- name: ⚙️ Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
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: echo $KEYSTORE_BASE64 | base64 --decode > "${{ 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
# 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: ⬆️ Github Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: ${{ github.workspace }}/build/app/outputs/apk/release/app-release.apk

0 comments on commit c8ac1b9

Please sign in to comment.