-
-
Notifications
You must be signed in to change notification settings - Fork 12
105 lines (103 loc) · 3.49 KB
/
build-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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: App Release
on:
workflow_dispatch:
jobs:
playStoreRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "zulu"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew bundleRelease
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "33.0.2"
- name: Create service_account.json
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: com.gigaworks.tech.calculator
releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }}
status: completed
track: beta
inAppUpdatePriority: 3
whatsNewDirectory: docs/whatsnew
- name: Remove service_account.json
run: rm service_account.json
updateRepo:
needs: playStoreRelease
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "zulu"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Update version code
run: ./gradlew bumpVersionCode
- name: Commit updates
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "ci: update version.properties"
git push
githubRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "zulu"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Check App version
run: |
APP_VERSION=$(./gradlew -q printVersionName)
echo "APP_VERSION = " ${APP_VERSION}
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
id: upload-release-asset
with:
name: "Calculator Plus"
bodyFile: "docs/whatsnew/whatsnew-en-GB"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
tag: v${{ env.APP_VERSION }}
allowUpdates: true
artifacts: "app/build/outputs/apk/debug/*.apk"
artifactContentType: application/vnd.android.package-archive
- uses: openhousepvt/slack@v1.3.2
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: "#calculator-plus"
version: v${{ env.APP_VERSION }}
downloadUrl: ${{ steps.upload-release-asset.outputs.html_url }}
platform: "Android"
if: success()