-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.2 KB
/
Copy pathci.yml
File metadata and controls
53 lines (50 loc) · 1.2 KB
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
name: ci
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm check
- run: pnpm test
- run: pnpm build
release:
needs: check
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Package dist.zip
run: |
cd dist
zip -r ../dist.zip .
cd ..
sha256sum dist.zip | awk '{print $1}' > dist.zip.sha256
echo "dist.zip sha256: $(cat dist.zip.sha256)"
- name: Attach assets to release
uses: softprops/action-gh-release@v2
with:
files: |
dist.zip
dist.zip.sha256