Skip to content

Commit d56238c

Browse files
committed
修改两个可用的 lock 文件
1 parent 43ca9a7 commit d56238c

5 files changed

Lines changed: 9993 additions & 2566 deletions

File tree

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
tags:
7+
- "v*.*"
8+
pull_request:
9+
branches: [master, main]
10+
11+
jobs:
12+
build:
13+
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/')
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "22"
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
release:
30+
if: >-
31+
github.event_name == 'push' &&
32+
startsWith(github.ref, 'refs/tags/v') &&
33+
contains(github.ref_name, '.')
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: write
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: "22"
43+
cache: npm
44+
45+
- name: Install dependencies
46+
run: npm ci
47+
48+
- name: Build
49+
run: npm run build
50+
51+
- name: Pack release zip
52+
id: pack
53+
run: |
54+
DATE=$(date -u +"%Y-%m-%d")
55+
ASSET="diary-${GITHUB_REF_NAME}_${DATE}.zip"
56+
(cd dist && zip -r "../${ASSET}" .)
57+
echo "asset=${ASSET}" >> "$GITHUB_OUTPUT"
58+
ls -la "${ASSET}"
59+
60+
- name: Upload to GitHub Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
files: ${{ steps.pack.outputs.asset }}
64+
generate_release_notes: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
node_modules
3-
package-lock.json
43
/dist
54
/diary
65

0 commit comments

Comments
 (0)