Skip to content

Commit

Permalink
ci: Add npm-publish workflow for automated npm package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Aug 19, 2024
1 parent f5fd7f2 commit f84e9cd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Publish to npm'
on:
release:
types: [published]

jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Set up NodeJS LTS
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm i
- name: Build
run: npm run build
- name : Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f84e9cd

Please sign in to comment.