-
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (29 loc) · 935 Bytes
/
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is published
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Package
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Clean install
run: npm ci
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to jsr
run: npx jsr publish