-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (48 loc) · 1.74 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
name: Release Build
on:
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Sign with debug key
run: |
sed -i "27i signingConfig signingConfigs.debug" ./app/build.gradle
curl -so- https://raw.githubusercontent.com/artem-zinnatullin/RxJavaProGuardRules/master/rxjava-proguard-rules/proguard-rules.txt | tee -a ./app/proguard-rules.pro
cat ./app/proguard-rules.pro
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew :app:assembleRelease
- name: Checking release version
id: version
run: |
echo ::set-output name=release_version::$(cat gradle.properties | grep appVerName | awk -F'=' '{print $2}')
- name: Delete tag if exists
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: ${{ steps.version.outputs.release_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag Release
uses: richardsimko/[email protected]
with:
tag_name: ${{ steps.version.outputs.release_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release
uses: softprops/action-gh-release@v1
if: success()
with:
tag_name: ${{ steps.version.outputs.release_version }}
files: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk
draft: false
generate_release_notes: true