Attempt to automate build
Some checks failed
Android Signed Build and Release / build (push) Failing after 1s
Some checks failed
Android Signed Build and Release / build (push) Failing after 1s
This commit is contained in:
parent
387c3c63e3
commit
3c23ad9105
1 changed files with 43 additions and 0 deletions
43
.forgejo/workflows/on_release.yml
Normal file
43
.forgejo/workflows/on_release.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Android Signed Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Decode keystore
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > my-release-key.jks
|
||||
|
||||
- name: Set up gradle properties
|
||||
run: |
|
||||
echo "storeFile=my-release-key.jks" >> ~/.gradle/gradle.properties
|
||||
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> ~/.gradle/gradle.properties
|
||||
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> ~/.gradle/gradle.properties
|
||||
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ~/.gradle/gradle.properties
|
||||
|
||||
- name: Grant execute permission to gradlew
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build signed APK
|
||||
run: ./gradlew assembleRelease
|
||||
|
||||
- name: Upload APK to Release
|
||||
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||
with:
|
||||
files: app/build/outputs/apk/release/*.apk
|
||||
env:
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue