Skip to content

Commit

Permalink
Add npm publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Nov 11, 2023
1 parent 5cf402b commit eae8d22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "htmlmark",
"version": "0.1.3",
"version": "0.2.0",
"description": "Lightweight markdown parser",
"main": "dist/mdp.cjs",
"module": "dist/mdp.esm.js",
Expand Down

0 comments on commit eae8d22

Please sign in to comment.