-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (46 loc) · 1.21 KB
/
build.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
name: Build
on:
push:
env:
PROJECT_NAME: "sealdice-ui"
jobs:
build:
name: Build & Pre-release
permissions:
contents: write
runs-on: "ubuntu-latest"
steps:
- name: Code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Build WebUI
run: pnpm run build-only
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}
path: dist/
- name: Prepare Zip
run: |
cd dist/
zip -r ${{ env.PROJECT_NAME }}.zip .
- name: Pre-release
uses: softprops/action-gh-release@v2
with:
name: Latest Build
tag_name: pre-release
files: dist/${{ env.PROJECT_NAME }}.zip
body: "> ⚠️注意️️:这是自动构建的预发布版本,非正式版本!"
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}