Skip to content

Commit 4bf243c

Browse files
authored
Manual trigger and keystore config
1 parent 962a5ec commit 4bf243c

1 file changed

Lines changed: 13 additions & 21 deletions

File tree

.github/workflows/android.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
# This workflow builds the release variant of the project and uploads it to a newly created release
2-
# It is triggered by the creation of a tag named 'release/v*', e.g. 'release/v1.0.0'
3-
# The <MY RELEASE NOTES> placeholder has to be replaced with the real release notes
4-
# Please note that the KeyStore credentials have to be created as secrets in your project
5-
# For more information about best practices, see:
6-
# https://grandcentrix.atlassian.net/wiki/spaces/TENG/pages/31180230199/GitHub+Actions+Best+Practices
71

82
name: Build Release
93

10-
on:
11-
release:
12-
types: [published]
4+
on: workflow_dispatch
135

146
concurrency:
157
group: ${{ github.workflow }}-${{ github.ref }}
@@ -36,21 +28,21 @@ jobs:
3628
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
3729
restore-keys: |
3830
${{ runner.os }}-gradle
31+
- name: Decode Keystore
32+
env:
33+
ENCODED_STRING: ${{ secrets.KEYSTORE }}
34+
run: |
35+
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
36+
mkdir "${TMP_KEYSTORE_FILE_PATH}"
37+
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/release.jks
3938
- name: Build Release
4039
run: ./gradlew assembleRelease
4140
env:
42-
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
43-
ALIAS_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
41+
KEYSTORE_PATH_RELEASE: ${{ runner.temp }}/keystore/release.jks
4442
timeout-minutes: 10
45-
- name: Gzip
46-
run: |
47-
mkdir -p app/build/outputs/apk/release/
48-
cp `find -name *.apk` app/build/outputs/apk/release/
49-
tar -czvf http-server.tar.gz app/build/outputs/apk/release/
50-
- name: Upload to release
51-
uses: JasonEtco/upload-to-release@master
43+
- name: Upload
44+
uses: actions/upload-artifact@v6
5245
with:
53-
args: http-server.tar.gz application/octet-stream
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
name: Build Artifacts
47+
path: app/build/outputs/
5648

0 commit comments

Comments
 (0)