Publish #3
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version" | |
required: true | |
default: "1.x.x" | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
registry-url: "https://registry.npmjs.org" | |
- run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
npm version ${{ github.event.inputs.version }} | |
npm ci | |
npm run build | |
(cd ./demo && npm install) | |
npm publish | |
git commit --amend -am "Release version ${{ github.event.inputs.version }}" | |
git push origin | |
git push origin "v${{ github.event.inputs.version }}" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |