forked from android-password-store/Android-Password-Store
-
Notifications
You must be signed in to change notification settings - Fork 39
83 lines (72 loc) · 2.58 KB
/
Copy pathdeploy_github_releases.yml
File metadata and controls
83 lines (72 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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: agrahn/android-password-store/.github/reusable-workflows/setup-gradle@8c172aa00e7ed769dda445d7834940c2b9094ed0 # develop
with:
java-version: 21
- 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:assembleRelease
- name: Upload release APK
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: APS Release APK
path: app/build/outputs/apk/release/app-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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Get Release APK
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: APS Release APK
path: artifacts
# - 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 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/app-release.apk
asset_name: APS-${{ steps.get_version.outputs.VERSION }}.apk
asset_content_type: application/vnd.android.package-archive