Node.js Package #1
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
name: Node.js Package | |
on: | |
workflow_dispatch: | |
inputs: | |
newversion: | |
description: 'Next Semantic Version Bump (major minor patch)' | |
required: true | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
registry-url: https://registry.npmjs.org/ | |
- run: npm install | |
- run: npm gen | |
- run: npm build | |
- name: Version and publish to npm | |
id: npm-bump | |
uses: bcomnes/npm-bump@v2 | |
with: | |
git_email: [email protected] | |
git_username: ${{ github.actor }} | |
newversion: ${{ github.event.inputs.newversion }} | |
push_version_commit: true # if your prePublishOnly step pushes git commits, you can omit this input or set it to false. | |
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use. | |
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm |