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

Commit c8ac1b9

Browse files
committed
Added Publish YML
1 parent 21e80dd commit c8ac1b9

2 files changed

Lines changed: 54 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ jobs:
2222
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
2323
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
2424
architecture: x64
25+
# This is seems to be only needed when running github actions locally with act
2526
# - run: git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.13.0-x64
2627
- run: flutter pub get
27-
# - run: flutter analyze --fatal-infos ./
28-
- run: dart format -o none --set-exit-if-changed ./
28+
# There are many issues currently that first need to be fixed to allow this rule
29+
# - run: flutter analyze --fatal-infos ./
30+
- run: dart format -o show --set-exit-if-changed ./
2931
- run: flutter test
30-
- run: flutter build apk
31-
- run: flutter build appbundle
32+
- run: flutter build apk --debug

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Publish"
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
publish-android:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: ⬇️ Checkout repository
9+
uses: actions/checkout@v3
10+
- name: ⚙️ Setup Java
11+
uses: actions/setup-java@v3
12+
with:
13+
java-version: '12.x'
14+
distribution: 'adopt'
15+
cache: 'gradle'
16+
- name: ⚙️ Setup Flutter
17+
uses: subosito/flutter-action@v2
18+
with:
19+
channel: 'stable'
20+
cache: true
21+
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
22+
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
23+
architecture: x64
24+
- name: 🔐 Retrieve base64 keystore and decode it to a file
25+
env:
26+
KEYSTORE_BASE64: ${{ secrets.ANDROID_SIGNING_KEY }}
27+
run: echo $KEYSTORE_BASE64 | base64 --decode > "${{ github.workspace }}/android/app/key.jks"
28+
- name: 📝🔐 Create keystore.properties file
29+
env:
30+
KEYSTORE_PROPERTIES_PATH: ${{ github.workspace }}/android/key.properties
31+
run: |
32+
echo '${{ inputs.flavor }}StoreFile=key.jks' > $KEYSTORE_PROPERTIES_PATH
33+
echo '${{ inputs.flavor }}KeyAlias=${{ secrets.ANDROID_KEY_ALIAS }}' >> $KEYSTORE_PROPERTIES_PATH
34+
echo '${{ inputs.flavor }}StorePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
35+
echo '${{ inputs.flavor }}KeyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}' >> $KEYSTORE_PROPERTIES_PATH
36+
# This is seems to be only needed when running github actions locally with act
37+
# - run: git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.13.0-x64
38+
- run: flutter pub get
39+
# There are many issues currently that first need to be fixed to allow this rule
40+
# - run: flutter analyze --fatal-infos ./
41+
- run: dart format -o show --set-exit-if-changed ./
42+
- run: flutter test
43+
- run: flutter build apk
44+
- run: flutter build appbundle
45+
- name: ⬆️ Github Release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
draft: true
49+
files: ${{ github.workspace }}/build/app/outputs/apk/release/app-release.apk

0 commit comments

Comments
 (0)