File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ jobs :
9+ format :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : pnpm/action-setup@v4
14+ - uses : actions/setup-node@v4
15+ with :
16+ node-version : 22
17+ cache : ' pnpm'
18+
19+ - run : pnpm install --frozen-lockfile
20+ - run : pnpm format:check
21+
22+ lint :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+ - uses : pnpm/action-setup@v4
27+ - uses : actions/setup-node@v4
28+ with :
29+ node-version : 22
30+ cache : ' pnpm'
31+
32+ - run : pnpm install --frozen-lockfile
33+ - run : pnpm lint
34+
35+ test :
36+ runs-on : ubuntu-latest
37+ steps :
38+ - uses : actions/checkout@v4
39+ - uses : pnpm/action-setup@v4
40+ - uses : actions/setup-node@v4
41+ with :
42+ node-version : 22
43+ cache : ' pnpm'
44+
45+ - run : pnpm install --frozen-lockfile
46+ - run : pnpm test
Original file line number Diff line number Diff line change 1+ name : Release Package
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ create-github-release :
10+ permissions :
11+ contents : write
12+ runs-on : ubuntu-latest
13+ if : startsWith(github.ref, 'refs/tags/v')
14+ steps :
15+ - name : Calculate release name
16+ run : |
17+ GITHUB_REF=${{ github.ref }}
18+ RELEASE_NAME=${GITHUB_REF#"refs/tags/"}
19+ echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
20+
21+ - name : Publish release
22+ uses : actions/create-release@v1
23+ env :
24+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25+ with :
26+ tag_name : ${{ github.ref }}
27+ release_name : ${{ env.RELEASE_NAME }}
28+ draft : false
29+ prerelease : false
30+
31+ publish-npm-release :
32+ runs-on : ubuntu-latest
33+ permissions :
34+ contents : read
35+ id-token : write
36+ steps :
37+ - uses : actions/checkout@v4
38+ - uses : pnpm/action-setup@v4
39+ - uses : actions/setup-node@v4
40+ with :
41+ node-version : 22
42+ cache : ' pnpm'
43+ registry-url : ' https://registry.npmjs.org'
44+
45+ - run : pnpm install --frozen-lockfile
46+ - run : npm publish --provenance --access public
47+ env :
48+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments