Android-Password-Store/.github/workflows/deploy_github_releases.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

137 lines
4.3 KiB
YAML
Raw Normal View History

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:
- name: Checkout repository
uses: actions/checkout@v3.0.0
- name: Set up JDK
uses: actions/setup-java@v3.0.0
2022-02-17 04:43:04 +00:00
with:
distribution: zulu
java-version: 17
cache: gradle
2020-06-18 06:31:18 +00:00
- name: Decrypt secrets
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
2020-06-18 06:31:18 +00:00
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build release binaries
uses: gradle/gradle-build-action@v2.1.3
with:
2022-02-17 04:43:04 +00:00
arguments: --no-configuration-cache :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2020-06-18 06:31:18 +00:00
- name: Upload non-free release APK
uses: actions/upload-artifact@v2.3.1
2020-06-18 06:31:18 +00:00
with:
name: APS Non-Free Release APK
path: app/build/outputs/apk/nonFree/release/app-nonFree-release.apk
2020-06-18 06:31:18 +00:00
- name: Upload non-free release Bundle
uses: actions/upload-artifact@v2.3.1
2020-06-18 06:31:18 +00:00
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@v2.3.1
with:
name: APS Free Release APK
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: 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
uses: actions/checkout@v3.0.0
2020-06-18 06:31:18 +00:00
- name: Get Non-Free Release APK
uses: actions/download-artifact@v2.1.0
2020-06-18 06:31:18 +00:00
with:
name: APS Non-Free Release APK
path: artifacts/nonFree
2020-06-18 06:31:18 +00:00
- name: Get Non-Free Bundle
uses: actions/download-artifact@v2.1.0
2020-06-18 06:31:18 +00:00
with:
name: APS Non-Free Release Bundle
path: artifacts/nonFree
- name: Get Free Release APK
uses: actions/download-artifact@v2.1.0
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@v2.0.0
2020-06-18 06:31:18 +00:00
with:
version: ${{ github.ref }}
path: ./CHANGELOG.md
- name: Create Release
id: create_release
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 }}
body: ${{ steps.changelog_reader.outputs.changes }}
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/}
- name: Upload Non-Free Release Apk
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 }}
asset_path: ./artifacts/nonFree/app-nonFree-release.apk
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
- name: Upload Non-Free Release Bundle
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 }}
asset_path: ./artifacts/nonFree/app-nonFree-release.aab
asset_name: APS-nonFree_${{ steps.get_version.outputs.VERSION }}.aab
2020-06-18 06:31:18 +00:00
asset_content_type: application/octet-stream
- name: Upload Free Release Apk
uses: actions/upload-release-asset@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