Manually Release NPM Version #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: Republish NPM package | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to republish' | |
required: true | |
jobs: | |
republish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.version }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |