File tree Expand file tree Collapse file tree 2 files changed +82
-0
lines changed
Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths-ignore :
8+ - ' **/*.md'
9+ - ' **/*.org'
10+ pull_request :
11+ paths-ignore :
12+ - ' **/*.md'
13+ - ' **/*.org'
14+
15+ jobs :
16+ test :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ - uses : pnpm/action-setup@v4
21+ - uses : actions/setup-node@v4
22+ with :
23+ node-version : lts/*
24+ cache : pnpm
25+ cache-dependency-path : pnpm-lock.yaml
26+ - name : Install dependencies
27+ run : pnpm install --frozen-lockfile
28+ - name : Lint and format check
29+ run : pnpm run check
30+ - name : Build example
31+ run : pnpm run example:build
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ env :
9+ CI : true
10+
11+ permissions : {}
12+
13+ jobs :
14+ publish :
15+ name : Publish
16+ runs-on : ubuntu-latest
17+ permissions :
18+ id-token : write
19+ contents : read
20+ steps :
21+ - name : Checkout Repo
22+ uses : actions/checkout@v4
23+
24+ - uses : pnpm/action-setup@v4
25+ - uses : actions/setup-node@v4
26+ with :
27+ node-version : lts/*
28+ cache : pnpm
29+ cache-dependency-path : pnpm-lock.yaml
30+ registry-url : ' https://registry.npmjs.org'
31+
32+ - name : Install dependencies
33+ run : pnpm install --frozen-lockfile
34+
35+ - name : Lint and format check
36+ run : pnpm run check
37+
38+ - name : Build example
39+ run : pnpm run example:build
40+
41+ - name : Verify tag matches package version
42+ run : |
43+ VERSION=$(node -p "require('./package.json').version")
44+ TAG="${GITHUB_REF_NAME#v}"
45+ if [ "$VERSION" != "$TAG" ]; then
46+ echo "Tag version ($TAG) does not match package.json version ($VERSION)"
47+ exit 1
48+ fi
49+
50+ - name : Publish to npm
51+ run : npm publish --access public --provenance
You can’t perform that action at this time.
0 commit comments