-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.62 KB
/
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
name: Release build
on:
release:
types: [published]
jobs:
release:
name: Release build
runs-on: [ubuntu-latest]
env:
EXCLUDE_AAB_FILTER: .*intermediate
# TODO Platform-specific slack channel name for notifications, eg. "gmlh-android"
SLACK_CHANNEL: project-slack-channel-name
VERSION_NAME: ${{ github.event.release.tag_name }}
steps:
- name: Set build number
run: echo "BUILD_NUMBER=$((GITHUB_RUN_NUMBER))" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Run unit tests
shell: bash
run: ./gradlew --continue testDevEnterpriseUnitTest
- name: Generate app bundle
shell: bash
env:
# TODO Set up `RELEASE_KEYSTORE_PASSWORD` secret for this GitHub repository
# TODO Set up `RELEASE_KEY_PASSWORD` secret for this GitHub repository
# TODO Set up `RELEASE_KEY_ALIAS` secret for this GitHub repository
RELEASE_KEYSTORE_PASS: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEY_PASS: ${{ secrets.RELEASE_KEY_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
run: ./gradlew bundleProdRelease
- name: Find artifacts and mapping file
shell: bash
run: |
echo ::set-output name=aab_file::$(find . -name "*.aab" | grep -v ${{env.EXCLUDE_AAB_FILTER}})
echo ::set-output name=mapping_file::$(find . -name mapping.txt)
id: artifacts
- name: Upload Android Release to Play Store
uses: r0adkll/upload-google-play@v1
with:
# TODO Set up `GOOGLE_PLAY_PUBLISH_SERVICE_ACCOUNT` as plaintext JSON for this GitHub repository
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_PUBLISH_SERVICE_ACCOUNT }}
# TODO This has to be applicationId
packageName: app.futured.androidprojecttemplate
releaseFiles: ${{ steps.artifacts.outputs.aab_file }}
track: internal
status: draft
whatsNewDirectory: whatsnew
mappingFile: ${{ steps.artifacts.outputs.mapping_file }}
- name: Slack Notification
if: failure()
uses: homoluctus/slatify@master
with:
type: "failure"
job_name: '*Release build*'
username: GitHub
channel: ${{env.SLACK_CHANNEL}}
url: ${{secrets.SLACK_WEB_HOOK}}
commit: true
token: ${{secrets.GITHUB_TOKEN}}