-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added new release changelog builder
Signed-off-by: Austin Hornhead <[email protected]>
- Loading branch information
1 parent
c421c6d
commit 4fcef4c
Showing
3 changed files
with
123 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Release Build | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
Build: | ||
name: Build/Sign APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup build tool version variable | ||
shell: bash | ||
run: | | ||
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | ||
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | ||
echo Last build tool version is: $BUILD_TOOL_VERSION | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Get Tag | ||
id: var | ||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Build APK | ||
id: build | ||
run: bash ./gradlew assembleRelease | ||
|
||
- name: Sign APK | ||
id: sign_apk | ||
uses: r0adkll/sign-android-release@v1 | ||
with: | ||
releaseDirectory: app/build/outputs/apk/release | ||
signingKeyBase64: ${{ secrets.BASE64KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
|
||
- name: Make artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Signed APP APK | ||
path: ${{steps.sign_apk.outputs.signedReleaseFile}} | ||
|
||
- name: Build AAB | ||
run: bash ./gradlew bundleRelease | ||
|
||
- name: Sign AAB | ||
id: sign_aab | ||
uses: r0adkll/sign-android-release@v1 | ||
with: | ||
releaseDirectory: app/build/outputs/bundle/release | ||
signingKeyBase64: ${{ secrets.BASE64KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
|
||
- name: Make artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Signed APP Bundle | ||
path: ${{steps.sign_aab.outputs.signedReleaseFile}} | ||
|
||
|
||
- name: Build Changelog | ||
id: changelog | ||
uses: ardalanamini/auto-changelog@v4 | ||
with: | ||
mention-authors: false | ||
semver: false | ||
|
||
- name: Commit CHANGELOG.md | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
branch: main | ||
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' | ||
file_pattern: CHANGELOG.md | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: GreenStash ${{ github.ref }} | ||
draft: true | ||
body: ${{ steps.changelog.outputs.changelog }}   | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Upload APK | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{steps.sign_apk.outputs.signedReleaseFile}} | ||
asset_name: GreenStash-${{ steps.var.outputs.tag }}.apk | ||
asset_content_type: application/zip | ||
|
||
- name: Upload AAB | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{steps.sign_aab.outputs.signedReleaseFile}} | ||
asset_name: GreenStash-${{ steps.var.outputs.tag }}.aab | ||
asset_content_type: application/zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Release Build | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
# on: | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
|
||
jobs: | ||
Build: | ||
|
Empty file.