Publish Package to npmjs #2
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: Publish Package to npmjs | |
on: | |
# release: | |
# types: [published] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version accepted by `npm version *`" | |
required: true | |
env: | |
EM_VERSION: 1.39.14 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mymindstorm/setup-emsdk@v11 | |
with: | |
version: ${{env.EM_VERSION}} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build jq-web | |
run: | | |
make | |
npm ci | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm ci | |
- run: npm version ${{ github.event.inputs.version }} | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |