Skip to content

Commit

Permalink
Create a workflow to publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
cutiful committed Dec 26, 2023
1 parent cd2f68e commit b66a930
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to npm

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20.x"
cache: "npm"
- run: npm install -g npm
- run: npm ci
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit b66a930

Please sign in to comment.