127 lines
4.6 KiB
YAML
127 lines
4.6 KiB
YAML
name: Publish APS binaries to GitHub Releases
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build release binaries
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup build environment
|
|
uses: android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
|
|
|
|
- name: Decrypt secrets
|
|
shell: bash
|
|
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
|
env:
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
- name: Build release binaries
|
|
shell: bash
|
|
run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
|
|
env:
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
|
|
- name: Upload non-free release APK
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
with:
|
|
name: APS Non-Free Release APK
|
|
path: app/build/outputs/apk/nonFree/release/app-nonFree-release.apk
|
|
|
|
- name: Upload non-free release Bundle
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
with:
|
|
name: APS Non-Free Release Bundle
|
|
path: app/build/outputs/bundle/nonFreeRelease/app-nonFree-release.aab
|
|
|
|
- name: Upload free release APK
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
with:
|
|
name: APS Free Release APK
|
|
path: app/build/outputs/apk/free/release/app-free-release.apk
|
|
|
|
- name: Clean secrets
|
|
if: "${{ always() }}"
|
|
run: scripts/signing-cleanup.sh
|
|
|
|
create_github_release:
|
|
name: Create GitHub Release
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
- name: Get Non-Free Release APK
|
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
|
with:
|
|
name: APS Non-Free Release APK
|
|
path: artifacts/nonFree
|
|
|
|
- name: Get Non-Free Bundle
|
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
|
with:
|
|
name: APS Non-Free Release Bundle
|
|
path: artifacts/nonFree
|
|
|
|
- name: Get Free Release APK
|
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
|
with:
|
|
name: APS Free Release APK
|
|
path: artifacts/free
|
|
|
|
- name: Get Changelog Entry
|
|
id: changelog_reader
|
|
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
|
|
with:
|
|
version: ${{ github.ref }}
|
|
path: ./CHANGELOG.md
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ${{ github.ref }}
|
|
body: ${{ steps.changelog_reader.outputs.changes }}
|
|
draft: true
|
|
prerelease: false
|
|
|
|
- name: Get the version
|
|
id: get_version
|
|
shell: bash
|
|
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Upload Non-Free Release Apk
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./artifacts/nonFree/app-nonFree-release.apk
|
|
asset_name: APS-nonFree_${{ steps.get_version.outputs.VERSION }}.apk
|
|
asset_content_type: application/vnd.android.package-archive
|
|
|
|
- name: Upload Non-Free Release Bundle
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./artifacts/nonFree/app-nonFree-release.aab
|
|
asset_name: APS-nonFree_${{ steps.get_version.outputs.VERSION }}.aab
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload Free Release Apk
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./artifacts/free/app-free-release.apk
|
|
asset_name: APS-free_${{ steps.get_version.outputs.VERSION }}.apk
|
|
asset_content_type: application/vnd.android.package-archive
|