28
28
- uses : denoland/setup-deno@v1
29
29
with :
30
30
deno-version : v2.x
31
+ - uses : pnpm/action-setup@v4
32
+ with :
33
+ version : 10
31
34
- uses : actions/setup-node@v4
32
35
with :
33
36
node-version : lts/*
37
+ cache : pnpm
34
38
- uses : oven-sh/setup-bun@v1
35
39
with :
36
40
bun-version : latest
40
44
with :
41
45
files : .test-report.xml
42
46
- run : deno task check
43
- - run : deno task dnt
44
- - run : bun run ./test_runner.js
45
- working-directory : ${{ github.workspace }}/npm/
47
+ - run : pnpm test
48
+ - run : pnpm test:bun
46
49
47
50
publish :
48
51
if : github.event_name == 'push'
@@ -56,31 +59,42 @@ jobs:
56
59
- uses : denoland/setup-deno@v1
57
60
with :
58
61
deno-version : v2.x
62
+ - uses : pnpm/action-setup@v4
63
+ with :
64
+ version : 10
59
65
- uses : actions/setup-node@v4
60
66
with :
61
67
node-version : lts/*
68
+ cache : pnpm
62
69
- if : github.ref_type == 'branch'
63
70
run : |
71
+ set -ex
64
72
jq \
65
73
--arg build "$GITHUB_RUN_NUMBER" \
66
74
--arg commit "${GITHUB_SHA::8}" \
67
75
'.version = .version + "-dev." + $build + "+" + $commit' \
68
76
deno.json > deno.json.tmp
69
- mv deno.json.tmp deno.json
77
+ jq \
78
+ --arg build "$GITHUB_RUN_NUMBER" \
79
+ '.version = .version + "-dev." + $build \
80
+ package.json > package.json.tmp
81
+ mv package.json.tmp package.json
70
82
- if : github.ref_type == 'tag'
71
- run : ' [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]] '
72
- - run : ' deno task dnt "$(jq -r .version deno.json)" '
73
- env :
74
- DNT_TEST : false
83
+ run : |
84
+ set -ex
85
+ [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
86
+ [[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
75
87
- run : |
76
88
set -ex
77
- npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
89
+ pnpm install
90
+ pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
78
91
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
79
- npm publish --provenance --access public
92
+ pnpm publish --provenance --access public
80
93
else
81
- npm publish --provenance --access public --tag dev
94
+ pnpm publish --provenance --access public --tag dev
82
95
fi
83
96
env:
84
97
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
98
+ NPM_CONFIG_PROVENANCE: "true"
85
99
working-directory: ${{ github.workspace }}/npm/
86
100
- run : deno publish --allow-dirty
0 commit comments