v: 1.0.0a #11
Workflow file for this run
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: Release Builder | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
name: Release Builder | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
with: | |
failOnError: true | |
commitMode: true | |
configurationJson: | | |
{ | |
"template": "#{{CHANGELOG}}<hr>\n\n<h3>Facts</h3>\n\n- <b>Number of commits</b>: #{{COMMITS}}\n- <b>Number of changed files</b>: #{{CHANGED_FILES}}\n- <b>Added lines</b>: #{{ADDITIONS}}\n- <b>Deleted lines</b>: #{{DELETIONS}}\n<hr>\n\nChangelog auto-generated by <a href='https://github.com/mikepenz/release-changelog-builder-action'>Release Changelog Builder Action (Mike Penz)</a>.\nRelease auto-created by <a href='https://github.com/softprops/action-gh-release'>action gh-release (Doug Tangren)</a>.", | |
"pr_template": "#{{TITLE}} (#{{MERGE_SHA}})", | |
"base_branches": ["main"], | |
"tag_resolver": { | |
"method": "sort" | |
}, | |
"categories": [ | |
{ | |
"title": "## 🚀 Features", | |
"labels": ["feat"] | |
}, | |
{ | |
"title": "## 🐛 Fixes", | |
"labels": ["fix"] | |
}, | |
{ | |
"title": "## 🦾 Enhancements", | |
"labels": ["enh"] | |
}, | |
{ | |
"title": "## 🧹 Refactorings", | |
"labels": ["rfct"] | |
}, | |
{ | |
"title": "## ⚒️ Build / Dependencies", | |
"labels": ["build"] | |
}, | |
{ | |
"title": "## ⚙️ CI", | |
"labels": ["ci"] | |
}, | |
{ | |
"title": "## 📦 Repository", | |
"labels": ["repo"] | |
}, | |
{ | |
"title": "## 💬 Other", | |
"labels": ["other"] | |
}, | |
{ | |
"title": "## ❔ Uncategorized", | |
"labels": [] | |
} | |
], | |
"label_extractor": [ | |
{ | |
"pattern": "(.+):(.+)", | |
"target": "$1", | |
"on_property": "title" | |
} | |
], | |
"transformers": [ | |
{ | |
"pattern": "(.+):(.+)", | |
"target": "-$2" | |
} | |
] | |
} | |
- name: Echo Changelog | |
env: | |
CHANGELOG: ${{ steps.github_release.outputs.changelog }} | |
run: echo "$CHANGELOG" | |
- name: Checkout repo including backpack submodule | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Show backpack directory | |
run: | | |
cd backpack-apps | |
ls | |
cd .. | |
- name: Set release name | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Build APK | |
run: | | |
export KEYSTORE_FILE=$(pwd)/keystore.jks | |
echo $KEYSTORE | base64 -d > $KEYSTORE_FILE | |
chmod +x ./gradlew | |
./gradlew -Psign build --stacktrace | |
cp app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/PINcredible-$RELEASE_VERSION.apk | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
KEYSTORE_PASSWD: ${{ secrets.KEYSTORE_PASSWD }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWD: ${{ secrets.KEYSTORE_KEY_PASSWD }} | |
- name: List build output | |
run: | | |
cd app/build/outputs/apk/release/ | |
ls | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: "Version ${{ env.RELEASE_VERSION }}" | |
body: ${{steps.github_release.outputs.changelog}} | |
files: app/build/outputs/apk/release/PINcredible-${{env.RELEASE_VERSION}}.apk |