forked from 1Selxo/rougo
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.21 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (45 loc) · 1.21 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
name: Build and Release
on:
push:
tags:
- 'V*'
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew :app:assembleRelease --stacktrace
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: rougo-${{ github.ref_name }}-release-apks
path: app/build/outputs/apk/release/*.apk
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/*.apk
name: ${{ github.ref_name }}
draft: false
prerelease: false
make_latest: true
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}