-
-
Notifications
You must be signed in to change notification settings - Fork 264
79 lines (66 loc) · 2.32 KB
/
build_and_deploy.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
name: Build and deploy
on:
push:
branches:
- 'ci_setup'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: 21
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Decode keystore
uses: timheuer/base64-to-file@v1
id: android_keystore
with:
fileName: "release.jks"
encodedString: ${{ secrets.KEYSTORE_FILE }}
- name: Prepare Gradle environment
run: |
echo "apply from: 'ci_signing.gradle'" >> mastodon/build.gradle
echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties
- name: Build and deploy to Google Play
run: bundle exec fastlane deploy
env:
KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
SUPPLY_VALIDATE_ONLY: true
SUPPLY_SKIP_UPLOAD_METADATA: true
SUPPLY_SKIP_UPLOAD_CHANGELOGS: true
- name: Build release apk
run: ./gradlew assembleRelease
env:
KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Upload release apk
uses: actions/upload-artifact@v4
with:
name: mastodon-release.apk
path: mastodon/build/outputs/apk/release/mastodon-release.apk
- name: Build githubRelease apk
run: ./gradlew assembleGithubRelease
env:
KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Upload githubRelease apk
uses: actions/upload-artifact@v4
with:
name: mastodon-githubRelease.apk
path: mastodon/build/outputs/apk/githubRelease/mastodon-githubRelease.apk
- name: Upload mappings
uses: actions/upload-artifact@v4
with:
name: mappings
path: mastodon/build/outputs/mapping/*/mapping.txt