-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.66 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
name: Package release
on:
push:
tags:
- v**
env:
IS_CI: true
permissions:
contents: write
jobs:
package:
name: Package release
# strategy:
# matrix:
# os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: windows-latest
steps:
# 检出仓库代码
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'
# setup and use Gradle
- name: Run packageExe
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.6
arguments: packageDistributionForCurrentOS --stacktrace --warning-mode all -x test -Pcompose.desktop.verbose=true
- name: Upload logs
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs
path: 'build\compose\logs\**'
retention-days: 3
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: package-exe
path: 'build/compose/binaries/main/exe/StopBonus-${{ github.ref_name }}.exe'
retention-days: 3
create-release:
name: Create release
runs-on: ubuntu-latest
needs: package
steps:
# 下载文件
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: package-exe
# Create gitHub release
- name: Create Github Release
uses: softprops/action-gh-release@v2
with:
files: StopBonus-${{ github.ref_name }}.exe
token: ${{ secrets.PUSH_TOKEN }}
# generate_release_notes: true