-
Notifications
You must be signed in to change notification settings - Fork 49
133 lines (119 loc) · 3.78 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build Release Binaries
on:
workflow_dispatch:
jobs:
# # Windows Package
# create-win-package:
# runs-on: windows-latest
# permissions:
# contents: write
# name: Create Windows Package
# steps:
# # Setup Java environment for the next steps
# - name: Setup Java
# uses: actions/setup-java@v2
# with:
# distribution: 'zulu'
# java-version: 21
# # Check out current repository
# - name: Fetch Sources
# uses: actions/checkout@v4
# # 设置工作目录
# - name: Set working directory
# run: |
# echo '${{ github.workspace }}'
# # Build Desktop Packaged application
# - name: Desktop App Package
# run: |
# cd "${{ github.workspace }}"
# ./gradlew packageMsi
# # Create a Draft Release
# - name: Draft Release
# uses: ncipollo/release-action@v1
# with:
# draft: true
# allowUpdates: true
# generateReleaseNotes: true #自动生成发行说明。
# tag: "${{ github.ref_name }}"
# artifacts: "${{ github.workspace }}/build/compose/binaries/main/msi/*.msi"
# token: ${{ secrets.GITHUB_TOKEN }}
create-mac-package:
runs-on: macos-latest
permissions:
contents: write
name: Create Mac Package
steps:
# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 21
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history
tags: true # Fetch all tags
# Add execute permissions to gradlew
- name: Set execute permissions on gradlew
run: chmod +x ./gradlew
# Build Desktop Packaged application
- name: Desktop App Package
run: ./gradlew packageDmg
# Get the latest tag
- name: Get latest tag
id: latesttag
run: |
TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "1.0.0")
echo "TAG=$TAG" >> $GITHUB_ENV
# Create a Draft Release
- name: Draft Release
uses: ncipollo/release-action@v1
with:
draft: true
allowUpdates: true
generateReleaseNotes: false #自动生成发行说明。
tag: "${{ env.TAG }}"
artifacts: "${{ github.workspace }}/build/compose/binaries/main/dmg/*.dmg"
token: ${{ secrets.GITHUB_TOKEN }}
# create-linux-package:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# name: Create Deb Package
# steps:
# # Setup Java environment for the next steps
# - name: Setup Java
# uses: actions/setup-java@v2
# with:
# distribution: 'zulu'
# java-version: 21
#
# # Check out current repository
# - name: Fetch Sources
# uses: actions/checkout@v4
#
# # Add execute permissions to gradlew
# - name: Set execute permissions on gradlew
# run: chmod +x ./gradlew
#
# # 设置工作目录
# - name: Set working directory
# run: |
# cd ${{ github.workspace }}
#
# # Build Desktop Packaged application
# - name: Desktop App Package
# run: ./gradlew packageDeb
#
# # Create a Draft Release
# - name: Draft Release
# uses: ncipollo/release-action@v1
# with:
# draft: true
# allowUpdates: true
# generateReleaseNotes: false #自动生成发行说明。
# tag: "${{ github.ref_name }}"
# artifacts: "${{ github.workspace }}/build/compose/binaries/main/deb/*.deb"
# token: ${{ secrets.GITHUB_TOKEN }}