-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (102 loc) · 3.42 KB
/
release.yml
File metadata and controls
120 lines (102 loc) · 3.42 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 13114758
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Checkout Secrets
uses: actions/checkout@v6.0.2
with:
repository: AnySoftKeyboard/secrets
token: ${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN_JANUS }}
path: secrets
- name: Build and Sign
run: ./gradlew assembleRelease bundleRelease
env:
KEYSTORE_FILE: ${{ github.workspace }}/secrets/anysoftkeyboard.keystore
KEYSTORE_PASSWORD: ${{ secrets.ANYSOFTKEYBOARD_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.JANUS_RELEASE_KEYSTORE_ALIAS }}
KEY_PASSWORD: ${{ secrets.JANUS_RELEASE_KEYSTORE_KEY_PASSWORD }}
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
append_body: true
files: |
app/build/outputs/apk/google/release/*.apk
app/build/outputs/bundle/googleRelease/*.aab
app/build/outputs/apk/foss/release/*.apk
app/build/outputs/bundle/fossRelease/*.aab
- name: Upload Google Play bundle artifact
uses: actions/upload-artifact@v6
with:
name: aab-bundle
path: app/build/outputs/bundle/googleRelease/*.aab
if-no-files-found: error
deploy-play-store:
needs: release
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Checkout Secrets
uses: actions/checkout@v6.0.2
with:
repository: AnySoftKeyboard/secrets
token: ${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN_JANUS }}
path: secrets
- name: Download bundle artifact
run: mkdir -p app/build/outputs/bundle/googleRelease
- uses: actions/download-artifact@v7
with:
name: aab-bundle
path: app/build/outputs/bundle/googleRelease
- name: Deploy to Play Store
run: bundle exec fastlane deploy
env:
PLAY_STORE_JSON_KEY: ${{ github.workspace }}/secrets/playstore-publisher-certs.json
increment-version:
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@v6.0.2
with:
ref: main
token: ${{ secrets.BOT_MASTER_RW_GITHUB_TOKEN_JANUS }}
- name: Increment Version
run: ./scripts/bump_version.sh
- name: Commit and Push
run: |
git config --global user.name "Polyglot"
git config --global user.email "ask@evendanan.net"
git add app/build.gradle.kts
git add $CHANGELOG_FILE
git commit -m "Auto-increment version code to ${{ env.NEW_VERSION_CODE }} and name to ${{ env.NEW_VERSION_NAME }} [skip ci]"
git push origin main