Skip to content

Commit

Permalink
ci: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Oct 29, 2024
1 parent 9ef51bb commit 5692da2
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and release app

on:
workflow_dispatch:
push:
tags:
- 'v*.*'

jobs:
build:
name: Build, sign and release app
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"

- name: Build APK
run: ./gradlew assembleRelease --no-daemon

- name: Sign APK
uses: ilharp/sign-android-release@v1
id: sign
with:
signingKey: ${{ secrets.KEYSTORE }}
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}

- name: Rename signed APK
run: |
mv "${{ steps.sign.outputs.signedFile }}" "app-release.apk"
- name: Create changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}

- name: Create release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.changes }}
files: "app-release.apk"
fail_on_unmatched_files: true
make_latest: true

0 comments on commit 5692da2

Please sign in to comment.