-
-
Notifications
You must be signed in to change notification settings - Fork 35
85 lines (72 loc) · 2.45 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build Release
on:
push:
tags:
- 'v*'
jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Retrieve the secret and decode it to a file
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEY_PROPERTIES_BASE64: ${{ secrets.KEY_PROPERTIES_BASE64 }}
run: |
echo "$KEY_PROPERTIES_BASE64" | base64 --decode > key.properties
echo "$KEYSTORE_BASE64" | base64 --decode > keystore.jks
- name: Build Release with Fastlane
env:
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bundle install
bundle exec fastlane install_plugins
bundle exec fastlane release ref_name:${{ github.ref_name }}
play-store:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Retrieve the secret and decode it to a file
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEY_PROPERTIES_BASE64: ${{ secrets.KEY_PROPERTIES_BASE64 }}
JSON_KEY_FILE_BASE64: ${{ secrets.JSON_KEY_FILE_BASE64 }}
run: |
echo "$KEY_PROPERTIES_BASE64" | base64 --decode > key.properties
echo "$KEYSTORE_BASE64" | base64 --decode > keystore.jks
echo "$JSON_KEY_FILE_BASE64" | base64 --decode > json_key_file.json
- name: Deploy to the Google Play
env:
JSON_KEY_FILE: 'json_key_file.json'
JSON_KEY_FILE_BASE64: ${{ secrets.JSON_KEY_FILE_BASE64 }}
if: ${{ env.JSON_KEY_FILE_BASE64 != '' }}
run: |
bundle install
bundle exec fastlane install_plugins
bundle exec fastlane deploy ref_name:${{ github.ref_name }}