Skip to content

Commit

Permalink
feat: add npm publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul-alhasany committed Sep 14, 2024
1 parent ee48feb commit b83e5af
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to NPM registry

on:
push:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/

- name: Setup pnpm and install dependencies
uses: pnpm/action-setup@v4
with:
version: latest
run_install: true

- name: Publish package
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit b83e5af

Please sign in to comment.