refactor: package name #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: kaisugi/action-regex-match@v1.0.1 | |
id: regex-match | |
with: | |
text: ${{ github.event.head_commit.message }} | |
regex: '^v[0-9]+\.[0-9]+\.[0-9]+$' | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Build App | |
run: bash ./gradlew assembleRelease | |
- name: Move files | |
if: ${{ steps.regex-match.outputs.match != '' }} | |
run: mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/app-release.apk | |
- name: Sign App | |
if: ${{ steps.regex-match.outputs.match != '' }} | |
id: sign_app | |
uses: ilharp/sign-android-release@v1.0.4 | |
with: | |
releaseDir: app/build/outputs | |
signingKey: ${{ secrets.SIGNINGKEYBASE64 }} | |
keyAlias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEYSTOREPASSWORD }} | |
keyPassword: ${{ secrets.KEYPASSWORD }} | |
- name: Build Changelog | |
if: ${{ steps.regex-match.outputs.match != '' }} | |
id: changelog | |
uses: ardalanamini/auto-changelog@v3 | |
with: | |
mention-authors: false | |
mention-new-contributors: false | |
include-compare: false | |
semver: false | |
- name: Create Release | |
if: ${{ steps.regex-match.outputs.match != '' }} | |
id: create_release | |
uses: ncipollo/release-action@v1.13.0 | |
with: | |
artifacts: "app/build/outputs/app-release-signed.apk" | |
body: ${{ steps.changelog.outputs.changelog }} | |
tag: ${{ github.event.head_commit.message }} | |
name: Release ${{ github.event.head_commit.message }} | |
token: ${{ secrets.GITHUB_TOKEN }} |