-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (51 loc) · 2.01 KB
/
release-candidate.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
name: Generate and publish Release Candidate
on:
push:
branches:
- 'release'
jobs:
publish-release-candidate:
name: Publish release candidate
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/setup-node@v3
with:
node-version:
16
- run: npm ci
working-directory: ./tools/beta-release/
- name: Write secrets
run: |
mkdir .secrets
touch .secrets/upload-key.jks
touch .secrets/service-account.json
touch .secrets/matrix.json
echo -n '${{ secrets.UPLOAD_KEY }}' | base64 --decode >> .secrets/upload-key.jks
echo -n '${{ secrets.FDROID_KEY }}' | base64 --decode >> .secrets/fdroid.keystore
echo -n '${{ secrets.SERVICE_ACCOUNT }}' | base64 --decode >> .secrets/service-account.json
echo -n '${{ secrets.MATRIX }}' | base64 --decode >> .secrets/matrix.json
- name: Assemble release variant
run: |
./tools/generate-release.sh "${{ secrets.STORE_PASS }}"
./tools/generate-fdroid-release.sh "${{ secrets.FDROID_STORE_PASS }}"
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.MY_PAT }}
script: |
const { publishRelease } = await import('${{ github.workspace }}/tools/beta-release/app.js')
const artifacts = {
bundle: '${{ github.workspace }}/app/build/outputs/bundle/release/app-release.aab',
mapping: '${{ github.workspace }}/app/build/outputs/mapping/release/mapping.txt',
fossApkPath: '${{ github.workspace }}/app/build/outputs/apk/release/app-foss-release-signed.apk',
}
await publishRelease(github, artifacts)