Create FUNDING.yml #27
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/[email protected] | |
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: Access Api keys | |
env: | |
clientId: ${{ secrets.CLIENT_ID }} | |
clientSecret: ${{ secrets.CLIENT_SECRET }} | |
path: app/src/main/res/values/secrets.xml | |
run: | | |
touch $path | |
echo \<resources\> >> $path | |
echo \<string name=\"CLIENT_ID\"\>$clientId\</string\> >> $path | |
echo \<string name=\"CLIENT_SECRET\"\>$clientSecret\</string\> >> $path | |
echo \</resources\> >> $path | |
- name: Build App | |
id: build | |
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/[email protected] | |
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@v4 | |
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/[email protected] | |
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 }} |