2020-12-07 07:43:45 +00:00
|
|
|
name: Publish APS binaries to GitHub Releases
|
2020-06-18 06:31:18 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build release binaries
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-06 18:34:30 +00:00
|
|
|
- name: Checkout repository
|
2022-04-21 15:21:12 +00:00
|
|
|
uses: actions/checkout@v3.0.2
|
2021-12-06 18:34:30 +00:00
|
|
|
|
2021-12-06 18:19:29 +00:00
|
|
|
- name: Set up JDK
|
2022-06-21 19:58:19 +00:00
|
|
|
uses: actions/setup-java@v3.4.0
|
2022-02-17 04:43:04 +00:00
|
|
|
with:
|
2022-05-25 12:29:04 +00:00
|
|
|
distribution: temurin
|
2022-02-17 04:43:04 +00:00
|
|
|
java-version: 17
|
2021-03-18 07:03:44 +00:00
|
|
|
|
2020-06-18 06:31:18 +00:00
|
|
|
- name: Decrypt secrets
|
2020-10-16 15:18:11 +00:00
|
|
|
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
2020-06-18 06:31:18 +00:00
|
|
|
env:
|
|
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
|
2020-09-21 08:47:06 +00:00
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Build release binaries
|
2022-06-20 16:05:01 +00:00
|
|
|
uses: gradle/gradle-build-action@v2.2.1
|
2020-10-01 08:44:36 +00:00
|
|
|
with:
|
2022-06-10 17:57:56 +00:00
|
|
|
arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
|
2022-02-20 13:28:35 +00:00
|
|
|
env:
|
|
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Upload non-free release APK
|
2022-05-20 16:20:47 +00:00
|
|
|
uses: actions/upload-artifact@v3.1.0
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
2020-07-02 11:49:32 +00:00
|
|
|
name: APS Non-Free Release APK
|
2020-07-22 08:53:17 +00:00
|
|
|
path: app/build/outputs/apk/nonFree/release/app-nonFree-release.apk
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Upload non-free release Bundle
|
2022-05-20 16:20:47 +00:00
|
|
|
uses: actions/upload-artifact@v3.1.0
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
2020-07-02 11:49:32 +00:00
|
|
|
name: APS Non-Free Release Bundle
|
2020-07-22 08:53:17 +00:00
|
|
|
path: app/build/outputs/bundle/nonFreeRelease/app-nonFree-release.aab
|
2020-07-02 11:49:32 +00:00
|
|
|
|
|
|
|
- name: Upload free release APK
|
2022-05-20 16:20:47 +00:00
|
|
|
uses: actions/upload-artifact@v3.1.0
|
2020-07-02 11:49:32 +00:00
|
|
|
with:
|
|
|
|
name: APS Free Release APK
|
2020-07-22 08:53:17 +00:00
|
|
|
path: app/build/outputs/apk/free/release/app-free-release.apk
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Clean secrets
|
2022-02-20 00:18:48 +00:00
|
|
|
if: "${{ always() }}"
|
2020-10-16 15:18:11 +00:00
|
|
|
run: scripts/signing-cleanup.sh
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
create_github_release:
|
|
|
|
name: Create GitHub Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-21 15:21:12 +00:00
|
|
|
uses: actions/checkout@v3.0.2
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Get Non-Free Release APK
|
2022-03-02 19:12:28 +00:00
|
|
|
uses: actions/download-artifact@v3.0.0
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
2020-07-02 11:49:32 +00:00
|
|
|
name: APS Non-Free Release APK
|
|
|
|
path: artifacts/nonFree
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Get Non-Free Bundle
|
2022-03-02 19:12:28 +00:00
|
|
|
uses: actions/download-artifact@v3.0.0
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
2020-07-02 11:49:32 +00:00
|
|
|
name: APS Non-Free Release Bundle
|
|
|
|
path: artifacts/nonFree
|
|
|
|
|
|
|
|
- name: Get Free Release APK
|
2022-03-02 19:12:28 +00:00
|
|
|
uses: actions/download-artifact@v3.0.0
|
2020-07-02 11:49:32 +00:00
|
|
|
with:
|
|
|
|
name: APS Free Release APK
|
|
|
|
path: artifacts/free
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Get Changelog Entry
|
|
|
|
id: changelog_reader
|
2022-07-04 03:33:32 +00:00
|
|
|
uses: mindsers/changelog-reader-action@v2.1.1
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
path: ./CHANGELOG.md
|
|
|
|
|
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
2021-12-06 18:19:29 +00:00
|
|
|
uses: actions/create-release@v1.1.4
|
2020-06-18 06:31:18 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ${{ github.ref }}
|
2021-02-23 10:20:48 +00:00
|
|
|
body: ${{ steps.changelog_reader.outputs.changes }}
|
2020-07-22 09:58:04 +00:00
|
|
|
draft: true
|
2020-06-18 06:31:18 +00:00
|
|
|
prerelease: false
|
|
|
|
|
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Upload Non-Free Release Apk
|
2021-12-06 18:19:29 +00:00
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
2020-06-18 06:31:18 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2020-07-22 08:53:17 +00:00
|
|
|
asset_path: ./artifacts/nonFree/app-nonFree-release.apk
|
2020-07-02 11:49:32 +00:00
|
|
|
asset_name: APS-nonFree_${{ steps.get_version.outputs.VERSION }}.apk
|
2020-06-18 06:31:18 +00:00
|
|
|
asset_content_type: application/vnd.android.package-archive
|
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Upload Non-Free Release Bundle
|
2021-12-06 18:19:29 +00:00
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
2020-06-18 06:31:18 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2020-07-22 08:53:17 +00:00
|
|
|
asset_path: ./artifacts/nonFree/app-nonFree-release.aab
|
2020-07-02 11:49:32 +00:00
|
|
|
asset_name: APS-nonFree_${{ steps.get_version.outputs.VERSION }}.aab
|
2020-06-18 06:31:18 +00:00
|
|
|
asset_content_type: application/octet-stream
|
2020-07-02 11:49:32 +00:00
|
|
|
|
|
|
|
- name: Upload Free Release Apk
|
2021-12-06 18:19:29 +00:00
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
2020-07-02 11:49:32 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2020-07-22 08:53:17 +00:00
|
|
|
asset_path: ./artifacts/free/app-free-release.apk
|
2020-07-02 11:49:32 +00:00
|
|
|
asset_name: APS-free_${{ steps.get_version.outputs.VERSION }}.apk
|
|
|
|
asset_content_type: application/vnd.android.package-archive
|