Publish Package to NPM and Dockerhub #6
This file contains hidden or 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
name: Publish Package to NPM | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: # Allows manual triggering from the GitHub UI | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm run build | |
- run: npm test | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: bitovi/[email protected] | |
with: | |
update_type: 'patch' | |
npm_token: ${{ secrets.NPM_TOKEN }} | |
publish: true |