Skip to content

Commit

Permalink
add publish to npm workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed May 7, 2024
1 parent 89f62f9 commit 9229d8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ jobs:
needs: call-build
with:
environment: production
call-publish-npm:
uses: ./.github/workflows/publish-npm.yml
secrets: inherit
needs: call-publish-v2
19 changes: 19 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Package

on: [workflow_call]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Configure NPM Token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm install
- name: Publish package
run: npm publish ${{github.ref_name}}

0 comments on commit 9229d8a

Please sign in to comment.