-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (48 loc) · 1.86 KB
/
play-prerelease.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
name: Publish to Google Play Closed Testing
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: Grant Gradle Rights
run: chmod +x ./gradlew
- name: Build Release Bundle with Gradle
run: ./gradlew clean bundlePlay -Pbase64EncodedPublicKey=${{secrets.PUBLIC_KEY}}
- 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: Build Release
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/playRelease
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: Upload Android Release to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{secrets.SERVICE_ACCOUNT_JSON}}
packageName: com.flauschcode.broccoli
releaseFiles: app/build/outputs/bundle/playRelease/app-play-release.aab
track: alpha
whatsNewDirectory: whatsNewDirectory
- name: Create Release on GitHub
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
prerelease: true
body: 'Pre-release which has been published for alpha testing on the Play Store.'