···
9
9
contents: read
10
10
11
11
jobs:
12
12
-
verify-jsr:
13
13
-
runs-on: ubuntu-latest
14
14
-
steps:
15
15
-
- name: checkout
16
16
-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
17
17
-
with:
18
18
-
submodules: true
19
19
-
persist-credentials: false
20
20
-
21
21
-
- name: setup deno
22
22
-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
23
23
-
with:
24
24
-
deno-version: v2.x
25
25
-
26
26
-
- name: build wasm
27
27
-
run: make
28
28
-
29
29
-
- name: Get Version
30
30
-
id: vars
31
31
-
run: echo "version=$(echo "${GITHUB_REF_NAME}" | sed 's/^v//')" >> $GITHUB_OUTPUT
32
32
-
33
33
-
- name: Build JSR
34
34
-
run: deno task build:jsr "${STEPS_VARS_OUTPUTS_VERSION}"
35
35
-
env:
36
36
-
STEPS_VARS_OUTPUTS_VERSION: ${{steps.vars.outputs.version}}
37
37
-
38
38
-
- name: dry run publish
39
39
-
run: deno publish --dry-run --allow-dirty
40
40
-
41
12
verify-npm:
42
13
runs-on: ubuntu-latest
43
14
steps:
···
82
53
path: ./build/npm
83
54
84
55
publish-npm:
85
85
-
needs: [verify-jsr, verify-npm]
56
56
+
needs: [verify-npm]
86
57
runs-on: ubuntu-latest
87
58
permissions:
88
59
contents: read
···
105
76
- name: Publish NPM
106
77
run: npm publish --access=public --tag=latest
107
78
working-directory: ./build/npm
108
108
-
109
109
-
publish-jsr:
110
110
-
needs: [verify-jsr, verify-npm]
111
111
-
runs-on: ubuntu-latest
112
112
-
permissions:
113
113
-
contents: read
114
114
-
id-token: write
115
115
-
116
116
-
steps:
117
117
-
- name: checkout
118
118
-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
119
119
-
with:
120
120
-
submodules: true
121
121
-
persist-credentials: false
122
122
-
123
123
-
- name: setup deno
124
124
-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
125
125
-
with:
126
126
-
deno-version: v2.x
127
127
-
128
128
-
- name: build wasm
129
129
-
run: make
130
130
-
131
131
-
- name: Get Version
132
132
-
id: vars
133
133
-
run: echo "version=$(echo "${GITHUB_REF_NAME}" | sed 's/^v//')" >> $GITHUB_OUTPUT
134
134
-
135
135
-
- name: Build JSR
136
136
-
run: deno task build:jsr "${STEPS_VARS_OUTPUTS_VERSION}"
137
137
-
env:
138
138
-
STEPS_VARS_OUTPUTS_VERSION: ${{steps.vars.outputs.version}}
139
139
-
140
140
-
- name: Publish JSR
141
141
-
run: deno publish --allow-dirty
···
82
82
- name: test
83
83
run: deno task test
84
84
85
85
-
jsr:
86
86
-
needs: test
87
87
-
runs-on: ubuntu-latest
88
88
-
steps:
89
89
-
- name: checkout
90
90
-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
91
91
-
with:
92
92
-
submodules: true
93
93
-
persist-credentials: false
94
94
-
95
95
-
- name: setup deno
96
96
-
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
97
97
-
with:
98
98
-
deno-version: v2.x
99
99
-
100
100
-
- name: build wasm
101
101
-
run: make
102
102
-
103
103
-
- name: Build JSR
104
104
-
run: deno task build:jsr 0.0.0-verify.0
105
105
-
106
106
-
- name: dry run publish
107
107
-
run: deno publish --dry-run --allow-dirty
108
108
-
109
85
npm:
110
86
needs: test
111
87
runs-on: ubuntu-latest
···
10
10
- building the local development artifacts, and
11
11
- verifying that the repo is ready for development.
12
12
13
13
-
It does **not** cover npm/JSR packaging or publishing.
13
13
+
It does **not** cover npm packaging or publishing.
14
14
15
15
## What the local build produces
16
16
···
290
290
Out of scope:
291
291
292
292
- `deno task build:npm`
293
293
-
- `deno task build:jsr`
294
293
- `npm publish`
295
295
-
- `deno publish`
296
294
- release tagging and package publishing workflows
···
6
6
"fmt": "deno fmt && clang-format -i src/*.c src/*.h",
7
7
"fmt:check": "deno fmt --check && clang-format --dry-run --Werror src/*.c src/*.h",
8
8
"build:npm": "deno run -A tasks/build-npm.ts",
9
9
-
"build:jsr": "deno run -A tasks/build-jsr.ts",
10
9
"bench": "deno run -A bench/mod.ts"
11
10
},
12
11
"imports": {
···
22
21
"exports": {
23
22
".": "./mod.ts",
24
23
"./validate": "./validate.ts"
25
25
-
},
26
26
-
"publish": {
27
27
-
"include": ["*.ts"],
28
28
-
"exclude": ["!wasm.ts"]
29
24
},
30
25
"nodeModulesDir": "auto",
31
26
"fmt": {
···
1
1
-
import jsonDeno from "../deno.json" with { type: "json" };
2
2
-
3
3
-
const [version] = Deno.args;
4
4
-
5
5
-
if (!version) {
6
6
-
throw new Error("a version argument is required to build the jsr package");
7
7
-
}
8
8
-
9
9
-
await Deno.writeTextFile(
10
10
-
new URL("../deno.json", import.meta.url),
11
11
-
JSON.stringify({
12
12
-
...jsonDeno,
13
13
-
version,
14
14
-
}),
15
15
-
);