-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (41 loc) · 1.2 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
name: Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install pkg globally
run: npm install -g pkg
- name: Install pnpm globally
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build for Windows
run: npm run build:win
- name: Package files
run: |
zip -r release.zip server.exe public
- name: List files
run: ls -al # 列出当前目录的文件,确认 ZIP 文件存在
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.release.tag_name }}
name: Release ${{ github.event.release.tag_name }}
body: |
This release includes the following assets:
- server.exe
- public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./release.zip