Skip to content

Commit

Permalink
👍 add Github Action to publish package to npmjs
Browse files Browse the repository at this point in the history
  • Loading branch information
ymrl committed Jan 18, 2024
1 parent 8712dc2 commit 5dab760
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish_package_to_npmjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Package to npmjs

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 5dab760

Please sign in to comment.