-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (95 loc) · 3.12 KB
/
Copy pathrelease.yaml
File metadata and controls
96 lines (95 loc) · 3.12 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
# This file was generated using Kotlin DSL (.github/workflows/release.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Release'
on:
workflow_dispatch:
inputs:
version_type:
description: 'Type of version bump (major, minor, patch)'
type: 'choice'
required: true
options:
- 'major'
- 'minor'
- 'patch'
changelog:
description: 'Changelog content for this release'
type: 'string'
required: true
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/release.yaml'' && ''.github/workflows/release.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/release.yaml'''
release:
runs-on: 'ubuntu-latest'
permissions:
contents: 'write'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Configure Git identity'
run: |-
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- id: 'step-1'
name: 'Set up JDK'
uses: 'actions/setup-java@v5'
with:
java-version: '17'
distribution: 'adopt'
- id: 'step-2'
name: 'Set up Gradle'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-3'
name: 'Checkout'
uses: 'actions/checkout@v4'
with:
ssh-key: '${{ secrets.RELEASE_KEY }}'
fetch-depth: '0'
- id: 'step-4'
name: 'Reveal secrets'
uses: 'entrostat/git-secret-action@v4'
with:
gpg-private-key: '${{ secrets.GPG_KEY }}'
- id: 'step-5'
name: 'Bump version, tag and push'
run: 'kotlin app/bump_version.main.kts "${{ github.event.inputs.version_type }}" "${{ github.event.inputs.changelog }}"'
- id: 'step-6'
name: 'Build signed APK for the GitHub release'
run: './gradlew assembleOfficialRelease'
- id: 'step-7'
name: 'Create GitHub release'
uses: 'softprops/action-gh-release@v2'
with:
name: '${{ steps.step-5.outputs.version }}'
tag_name: '${{ steps.step-5.outputs.version }}'
draft: 'false'
files: |-
app/build/outputs/apk/official/release/app-official-release.apk
app/build/outputs/mapping/officialRelease/mapping.txt
app/build/outputs/mapping/officialRelease/configuration.txt
app/build/outputs/mapping/officialRelease/seeds.txt
app/build/outputs/mapping/officialRelease/usage.txt
- id: 'step-8'
name: 'Set up Ruby'
uses: 'ruby/setup-ruby@v1'
with:
ruby-version: '3.2.3'
- id: 'step-9'
name: 'Publish to Play Store'
working-directory: 'fastlane'
run: |-
bundle install --jobs 4 --retry 3
bundle exec fastlane playstore