-
Notifications
You must be signed in to change notification settings - Fork 15
73 lines (61 loc) · 1.96 KB
/
tag-release.yml
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
name: Create release from tag
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
name: Build, sign and upload artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Unpack Config file
run: openssl base64 -d -out config.properties <<< "${{ secrets.CONFIG_PROPERTIES }}"
- name: Unpack Certificates
run: |
openssl base64 -d -out app/primal_alternative_android.jks <<< "${{ secrets.CERT_ALTERNATIVE }}"
openssl base64 -d -out app/primal_googlePlay_android.jks <<< "${{ secrets.CERT_PLAYSTORE }}"
- name: Build APK
run: ./gradlew assembleReleaseAlternative --no-daemon
- name: Prepare APK
run: mv app/build/outputs/apk/releaseAlternative/*apk primal-${{ github.ref_name }}.apk
- name: Zip R8 mapping file
run: zip -j primal-${{ github.ref_name }}-mapping.zip app/build/outputs/mapping/releaseAlternative/mapping.txt
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: primal-${{ github.ref_name }}
path: |
primal-${{ github.ref_name }}.apk
primal-${{ github.ref_name }}-mapping.zip
release:
name: Create GitHub release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: primal-${{ github.ref_name }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: Primal ${{ github.ref_name }}
draft: true
prerelease: true
body_path: RELEASE_NOTES.md
files: primal-${{ github.ref_name }}/*