2020-06-18 06:31:18 +00:00
|
|
|
name: Release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build release binaries
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/checkout@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: release/signing-setup.sh "$ENCRYPT_KEY"
|
|
|
|
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-06-18 06:31:18 +00:00
|
|
|
- name: Generate cache key
|
|
|
|
run: ./.github/checksum.sh checksum.txt
|
|
|
|
|
|
|
|
- name: Cache gradle modules
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/cache@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches/modules-2
|
|
|
|
key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlemodules-
|
|
|
|
|
|
|
|
- name: Cache gradle jars
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/cache@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches/jars-3
|
|
|
|
key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlejars-
|
|
|
|
|
|
|
|
- name: Cache gradle build
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/cache@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches/build-cache-1
|
|
|
|
key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlebuildcache-
|
|
|
|
|
|
|
|
- name: Download gradle dependencies
|
|
|
|
run: ./gradlew dependencies
|
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Build release binaries
|
|
|
|
run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Upload non-free release APK
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
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
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
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
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
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
|
|
|
|
if: always()
|
|
|
|
run: release/signing-cleanup.sh
|
|
|
|
|
|
|
|
create_github_release:
|
|
|
|
name: Create GitHub Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/checkout@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-07-02 11:49:32 +00:00
|
|
|
- name: Get Non-Free Release APK
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/download-artifact@v2
|
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
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/download-artifact@v2
|
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
|
2020-07-14 18:38:34 +00:00
|
|
|
uses: actions/download-artifact@v2
|
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
|
|
|
|
uses: mindsers/changelog-reader-action@v1.1.0
|
|
|
|
with:
|
|
|
|
version: ${{ github.ref }}
|
|
|
|
path: ./CHANGELOG.md
|
|
|
|
|
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ${{ github.ref }}
|
|
|
|
body: ${{ steps.changelog_reader.outputs.log_entry }}
|
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
|
2020-06-18 06:31:18 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
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
|
2020-06-18 06:31:18 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
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
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
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
|