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 install
48
+ - run : pnpm test
49
+ - run : pnpm test:bun
46
50
47
51
publish :
48
52
if : github.event_name == 'push'
@@ -56,31 +60,42 @@ jobs:
56
60
- uses : denoland/setup-deno@v1
57
61
with :
58
62
deno-version : v2.x
63
+ - uses : pnpm/action-setup@v4
64
+ with :
65
+ version : 10
59
66
- uses : actions/setup-node@v4
60
67
with :
61
68
node-version : lts/*
69
+ cache : pnpm
62
70
- if : github.ref_type == 'branch'
63
71
run : |
72
+ set -ex
64
73
jq \
65
74
--arg build "$GITHUB_RUN_NUMBER" \
66
75
--arg commit "${GITHUB_SHA::8}" \
67
76
'.version = .version + "-dev." + $build + "+" + $commit' \
68
77
deno.json > deno.json.tmp
69
78
mv deno.json.tmp deno.json
79
+ jq \
80
+ --arg build "$GITHUB_RUN_NUMBER" \
81
+ '.version = .version + "-dev." + $build' \
82
+ package.json > package.json.tmp
83
+ mv package.json.tmp package.json
70
84
- 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
85
+ run : |
86
+ set -ex
87
+ [[ "$(jq -r .version deno.json)" = "$GITHUB_REF_NAME" ]]
88
+ [[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]]
75
89
- run : |
76
90
set -ex
77
- npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
91
+ pnpm install
92
+ pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
78
93
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
79
- npm publish --provenance --access public
94
+ pnpm publish --provenance --access public --no-git-checks
80
95
else
81
- npm publish --provenance --access public --tag dev
96
+ pnpm publish --provenance --access public --no-git-checks --tag dev
82
97
fi
83
98
env:
84
99
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
85
- working-directory: ${{ github.workspace }}/npm/
100
+ NPM_CONFIG_PROVENANCE: "true"
86
101
- run : deno publish --allow-dirty
0 commit comments