-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (90 loc) · 3.01 KB
/
play-store-publish.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
name: 🚀 Play Store publish
on:
workflow_dispatch:
inputs:
track:
description: "Play Store track"
required: true
type: choice
default: internal
options:
- internal
- alpha
- beta
- production
upload_binary:
description: "Upload App Bundle (AAB)"
required: true
type: boolean
default: true
upload_assets:
description: "Upload screenshots & metadata"
required: true
type: boolean
default: false
in_app_update_level:
description: "In-app update level"
required: true
type: choice
default: none
options:
- none
- feature
- bugfix
- hotfix
tag_repository:
description: "Tag the repository"
required: true
type: boolean
default: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: ☕ Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: 🐘 Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary-as-pr-comment: on-failure
- name: 🔨 Build Android App
env:
PLAYSTORE_SECRET_PASSPHRASE: ${{ secrets.PLAYSTORE_SECRET_PASSPHRASE }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
CI_BUILD_NUMBER: ${{ github.run_number }}
run: |
./_ci/decrypt_secrets.sh
./gradlew --no-daemon :tasks-app-android:bundleStoreRelease \
-Pci=true \
-Pplaystore.keystore.file="${PWD}/_ci/tasksApp.keystore" \
-Pplaystore.keystore.password="${KEYSTORE_PASSWORD}" \
-Pplaystore.keystore.key_password="${KEYSTORE_KEY_PASSWORD}"
# allows Bundler gem installation (used for fastlane gem)
- name: 💎 Setup Ruby 3.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: 🚀 Play Store publish
run: |
sudo apt -y install libxml2-utils
gem install bundler
bundle config set --local path .bundler
bundle install --jobs "$(nproc)"
./_ci/playstore.sh "${{ inputs.track }}" ${{ inputs.upload_binary }} ${{ inputs.upload_assets }} "${{ inputs.in_app_update_level }}"
- name: 📌 Tag Release
if: ${{ inputs.tag_repository }}
run: |
sudo snap install yq
version_name=$(yq e '.versions.tasksApp-name' gradle/libs.versions.toml)
version_code=${{ github.run_number }}
git config user.name 'Github Actions'
git config user.email '[email protected]'
git tag -a v${version_name}.${version_code}-playstore -m "🚀 Published version ${version_name}.${version_code} on Play Store"
git push origin --tags