-
Notifications
You must be signed in to change notification settings - Fork 36
38 lines (38 loc) · 1.14 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: NPM Publish
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: deno test -A src/
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
- name: dnt
if: startsWith(github.ref, 'refs/tags/')
run: deno run -A ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
- uses: actions/setup-node@v3
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
- name: npm publish
if: startsWith(github.ref, 'refs/tags/')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: cd npm && npm publish --provenance --access public
- name: Publish to JSR
run: npx jsr publish --allow-dirty