Skip to content

Commit dca3cca

Browse files
committed
Merge workflows
1 parent 397a11d commit dca3cca

File tree

6 files changed

+70
-84
lines changed

6 files changed

+70
-84
lines changed

.github/workflows/coverage.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/publish-jsr.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/publish-npm.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish release
2+
on:
3+
release:
4+
types: [created]
5+
workflow_dispatch:
6+
jobs:
7+
publish-jsr:
8+
name: Publish to JSR.io
9+
runs-on: ubuntu-2404
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
15+
- run: npm install -g jsr
16+
- run: jsr publish
17+
publish-npm:
18+
name: Publish to NPM
19+
runs-on: ubuntu-2404
20+
permissions:
21+
contents: read
22+
id-token: write
23+
steps:
24+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
25+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
26+
with:
27+
node-version: 22
28+
registry-url: 'https://registry.npmjs.org'
29+
cache: npm
30+
- run: npm ci
31+
- run: npm run build
32+
- run: npm publish --provenance --access public
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
35+
standalone:
36+
name: Upload files to GitHub Releases
37+
runs-on: ubuntu-2404
38+
permissions:
39+
contents: write
40+
id-token: write
41+
steps:
42+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
43+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
44+
with:
45+
node-version: 22
46+
registry-url: 'https://registry.npmjs.org'
47+
cache: npm
48+
- run: npm ci
49+
- run: npm run build
50+
- run: |
51+
cd build
52+
npm ci
53+
npm run build:release
54+
cd ..
55+
- run: gh release upload ${{ github.event.release.tag_name }} build/`npx jsbt outfile`
56+
env:
57+
GH_TOKEN: ${{ github.token }}
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- run: npm run build --if-present
3535
- run: npm run lint --if-present
3636
node:
37-
name: v${{ matrix.node }} @ ubuntu-latest
37+
name: Node v${{ matrix.node }}
3838
runs-on: ubuntu-latest
3939
strategy:
4040
matrix:
@@ -50,3 +50,15 @@ jobs:
5050
- run: npm install
5151
- run: npm run build --if-present
5252
- run: npm test
53+
coverage:
54+
name: Measure test coverage on node
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
58+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
59+
with:
60+
registry-url: 'https://registry.npmjs.org'
61+
cache: npm
62+
- run: npm install
63+
- run: npm run build --if-present
64+
- run: npm run test:coverage

.github/workflows/upload-release.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)