-
Notifications
You must be signed in to change notification settings - Fork 4
92 lines (73 loc) · 2.05 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
name: CI Create Release
on:
push:
tags:
- 'v*'
jobs:
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup pnpm
run: npm install -g pnpm
- name: Build
run: |
cd ui && pnpm i && pnpm run build:prod
- name: Upload frontend build
uses: actions/upload-artifact@v3
with:
name: frontend-artifact
path: ./ui/dist
server-build:
runs-on: ubuntu-latest
needs: frontend-build
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
cache: true
- name: Setup GF
run: wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(go env GOOS)_$(go env GOARCH) && chmod +x gf && ./gf install -y && rm ./gf
- name: Download frontend build
uses: actions/download-artifact@v3
with:
name: frontend-artifact
path: ./ui/dist
- name: Build
run: |
gf pack ./ui/dist ./packed/dist.go
gf build -s linux,windows -a amd64,arm64 --gf.gcfg.file=gf.yaml -p ./temp
python release.py
- name: Upload server build
uses: actions/upload-artifact@v3
with:
name: server-artifact
path: |
./temp
release:
runs-on: ubuntu-latest
needs: [server-build]
steps:
- uses: actions/checkout@v3
- name: Download server build
uses: actions/download-artifact@v3
with:
name: server-artifact
path: ./temp
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{secrets.TOKEN}}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
# body_path: ./build/changelog.md
draft: false
prerelease: false
files: |
./temp/*