generated from keploy/template
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add a github actions for publishing to npm
Signed-off-by: Sarthak Shyngle <[email protected]>
- Loading branch information
1 parent
03bae50
commit b40a15c
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish to npm | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' # Change this to the Node.js version you are using | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Publish to npm | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm publish |