Skip to content

Commit 2f94aa2

Browse files
committed
Update ci release and build scripts
1 parent c7f0563 commit 2f94aa2

File tree

2 files changed

+10
-76
lines changed

2 files changed

+10
-76
lines changed

.github/workflows/release.yml

+6-27
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,12 @@ name: Publish release
22
on:
33
release:
44
types: [created]
5-
workflow_dispatch:
65
jobs:
7-
publish-jsr:
8-
name: Publish to JSR.io
9-
runs-on: ubuntu-latest
6+
release-js:
7+
name: 'jsbt v0.3.1' # Should match commit below
8+
uses: paulmillr/jsbt/.github/workflows/release.yml@c45f03360e0171b138f04568d2fdd35d7bbc0d35
9+
secrets:
10+
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
1011
permissions:
11-
contents: read
12+
contents: write
1213
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-latest
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 }}

.github/workflows/test-js.yml

+4-49
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,8 @@
1-
name: Run JS tests
2-
1+
name: Run tests
32
on:
43
- push
54
- pull_request
65
jobs:
7-
bun:
8-
name: Bun
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
12-
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
13-
- run: bun install
14-
- run: bun run build
15-
- run: bun test/index.test.js
16-
deno:
17-
name: Deno
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
21-
- uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2
22-
- run: deno install
23-
- run: deno run build
24-
- run: deno --allow-env --allow-write --allow-read test/index.test.js
25-
lint:
26-
name: Lint
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
30-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
31-
with:
32-
registry-url: 'https://registry.npmjs.org'
33-
cache: npm
34-
- run: npm install
35-
- run: npm run build --if-present
36-
- run: npm run lint --if-present
37-
node:
38-
name: Node v${{ matrix.version }} @ ${{ matrix.os }}
39-
runs-on: ${{ matrix.os }}
40-
strategy:
41-
fail-fast: false
42-
matrix:
43-
version: [16, 18, 20, 22]
44-
os: [ubuntu-latest, windows-latest, macOS-latest]
45-
steps:
46-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
47-
- name: Use Node.js ${{ matrix.version }}
48-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
49-
with:
50-
node-version: ${{ matrix.version }}
51-
- run: npm install
52-
- run: npm run build --if-present
53-
- run: npm test
6+
test-js:
7+
name: 'jsbt v0.3.1' # Should match commit below
8+
uses: paulmillr/jsbt/.github/workflows/test-js.yml@c45f03360e0171b138f04568d2fdd35d7bbc0d35

0 commit comments

Comments
 (0)