forked from vfsfitvnm/ViMusic
-
Notifications
You must be signed in to change notification settings - Fork 134
92 lines (71 loc) · 2.74 KB
/
weekly-deploy-customversion.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
86
87
88
89
90
91
92
name: Weekly Android app deploy
on:
schedule:
# Gotta wait until contributors.json is updated
- cron: '0 0 * * 2' # Every Tuesday at 0AM
# Allow manual trigger
workflow_dispatch:
concurrency:
group: 'Weekly-deploy'
cancel-in-progress: false # Don't cancel any in-progress runs in this group
jobs:
setup:
runs-on: ubuntu-latest
# Set date as a variable
outputs:
BUILD_DATE: ${{ steps.date.outputs.date }}
APK_FILENAME: app-foss-release-${{ steps.date.outputs.date }}.apk
steps:
- name: Get date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
build-apk:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Java 21
uses: actions/[email protected]
with:
java-version: "21"
distribution: "corretto"
cache: gradle
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Rename to match build number
run: |
mkdir -p app
cp composeApp/build/outputs/apk/foss/debug/app-foss-debug.apk app/${{ needs.setup.outputs.APK_FILENAME }}
- name: Upload built artifact for next job
uses: actions/[email protected]
with:
name: ${{ needs.setup.outputs.APK_FILENAME }}
path: app/${{ needs.setup.outputs.APK_FILENAME }}
upload-to-release:
needs: [setup, build-apk]
runs-on: ubuntu-latest
steps:
- name: Retrieve APK
uses: actions/[email protected]
with:
name: ${{ needs.setup.outputs.APK_FILENAME }}
- name: Upload built APK to release
uses: softprops/action-gh-release@v2
with:
files: ${{ needs.setup.outputs.APK_FILENAME }}
prerelease: true
name: RiMusic Weekly Build | Custom Version | ${{ needs.setup.outputs.BUILD_DATE }}
tag_name: "custom-version"
body: |
<div align="center">
<img src="/assets/design/latest/app_logo.svg" width="300" height="100" />
<p><b>RiMusic</b> Custom Version</p>
<p>Remember, the custom version is not an official release.</p>
</div>
## ❗ CUSTOM VERSION
**WARNING**: This custom version is not an official release, it only serves to anticipate fix or feature pending the official release. Downloading only if invited by the developer, it may damage your current installation.
## 📲 Installation
> Android treats this installation as a different app and will not remove old RiMusic app.
Download [HERE](https://github.com/knighthat/RiMusic/releases/download/custom-version/${{ needs.setup.outputs.APK_FILENAME }}) or use link down below
token: ${{ secrets.RELEASE_TOKEN }}
generate_release_notes: true