-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.5 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
50
51
52
53
54
55
56
name: "Build Action"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
Build-NextNapCatWebUI:
runs-on: ubuntu-latest
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.TOKEN }}
- name: Set version
run: |
commit_sha=$(git rev-parse --short HEAD)
version=$(jq -r '.version' package.json)
echo "version=${version}" >> $GITHUB_ENV
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.X
- name: Build NextNapCatWebUI
run: |
npm install
npm run webui:build
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NextNapCatWebUI
path: dist
- name: Install zip
run: sudo apt-get install -y zip
- name: Compress subdirectories
run: |
zip -q -r NextNapCatWebUI.zip dist/*
- name: Create Release and Upload Artifacts
if: contains(github.event.head_commit.message, 'release')
uses: softprops/action-gh-release@v1
with:
name: NextNapCatWebUI-v${{ env.version }}
tag_name: v${{ env.version }}
token: ${{ secrets.TOKEN }}
files: |
NextNapCatWebUI.zip