File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
branches :
7
7
- main
8
+ paths :
9
+ - deno.json
8
10
9
11
jobs :
10
12
publish :
19
21
node-version : " 20.x"
20
22
registry-url : " https://registry.npmjs.org"
21
23
- uses : denoland/setup-deno@v1
22
- - run : deno run -A scripts/npm.ts
24
+ - run : |
25
+ echo "DENO_VERSION=$(cat deno.json | jq \".version\")" >> $GITHUB_ENV
26
+ echo "NPM_VERSION=$(npm info @denosaurs/typefetch --json | jq \".['dist-tags'].latest\")" >> $GITHUB_ENV
27
+ echo "JSR_VERSION=$(curl -s https://jsr.io/@denosaurs/typefetch/meta.json | jq \".latest\")" >> $GITHUB_ENV
23
28
- run : deno publish
29
+ if : ${{ env.DENO_VERSION != env.JSR_VERSION }}
30
+ - run : deno run -A scripts/npm.ts
31
+ if : ${{ env.DENO_VERSION != env.NPM_VERSION }}
24
32
- run : npm publish --provenance --access public
33
+ if : ${{ env.DENO_VERSION != env.NPM_VERSION }}
25
34
working-directory : ./npm
26
35
env :
27
36
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments