-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (44 loc) · 1.69 KB
/
fdroid-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
name: Provide Signed Release for F-Droid
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Assemble Release
run: ./gradlew clean assembleFdroidRelease
- name: Setup Build Tools Version
shell: bash
run: |
BUILD_TOOLS_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOLS_VERSION=$BUILD_TOOLS_VERSION" >> $GITHUB_ENV
echo Last build tools version is: $BUILD_TOOLS_VERSION
- name: Sign Release
uses: r0adkll/sign-android-release@v1
id: sign_release
with:
releaseDirectory: app/build/outputs/apk/fdroid/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
- name: Rename APK
run: mv ${{steps.sign_release.outputs.signedReleaseFile}} app/build/outputs/apk/fdroid/release/app-fdroid-release.apk
- name: Create Release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: 'app/build/outputs/apk/fdroid/release/app-fdroid-release.apk'
artifactErrorsFailBuild: true
tag: '${{ github.ref_name}}-fdroid'
commit: master
generateReleaseNotes: true
body: 'Provides a signed APK for reproducible builds.'