2022-08-24 16:35:16 +02:00
|
|
|
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@v2
|
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: '11'
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version:
|
|
|
|
16
|
|
|
|
- run: npm ci
|
|
|
|
working-directory: ./tools/beta-release/
|
|
|
|
|
2022-08-31 21:48:29 +02:00
|
|
|
- name: Write secrets
|
|
|
|
run: |
|
|
|
|
mkdir .secrets
|
|
|
|
touch .secrets/upload-key.jks
|
|
|
|
touch .secrets/service-account.json
|
2022-08-31 23:38:22 +02:00
|
|
|
touch .secrets/matrix.json
|
2022-08-31 21:48:29 +02:00
|
|
|
echo -n '${{ secrets.UPLOAD_KEY }}' | base64 --decode >> .secrets/upload-key.jks
|
2022-09-29 20:29:33 +02:00
|
|
|
echo -n '${{ secrets.FDROID_KEY }}' | base64 --decode >> .secrets/fdroid.keystore
|
2022-08-31 21:48:29 +02:00
|
|
|
echo -n '${{ secrets.SERVICE_ACCOUNT }}' | base64 --decode >> .secrets/service-account.json
|
2022-08-31 23:38:22 +02:00
|
|
|
echo -n '${{ secrets.MATRIX }}' | base64 --decode >> .secrets/matrix.json
|
2022-08-24 16:35:16 +02:00
|
|
|
|
|
|
|
- name: Assemble release variant
|
2022-09-29 20:29:33 +02:00
|
|
|
run: |
|
2022-09-29 21:40:47 +02:00
|
|
|
./tools/generate-release.sh "${{ secrets.STORE_PASS }}"
|
|
|
|
./tools/generate-fdroid-release.sh "${{ secrets.FDROID_STORE_PASS }}"
|
2022-08-24 16:35:16 +02:00
|
|
|
|
2022-08-30 21:32:52 +02:00
|
|
|
- uses: actions/github-script@v6
|
|
|
|
with:
|
2022-09-01 23:49:36 +02:00
|
|
|
github-token: ${{ secrets.MY_PAT }}
|
2022-08-30 21:32:52 +02:00
|
|
|
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',
|
2022-09-29 20:29:33 +02:00
|
|
|
fossApkPath: '${{ github.workspace }}/app/build/outputs/apk/release/app-foss-release-signed.apk',
|
2022-08-30 21:32:52 +02:00
|
|
|
}
|
|
|
|
await publishRelease(github, artifacts)
|
|
|
|
|