Publish to NPM #318
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
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Publish to NPM | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release channel' | |
required: true | |
default: 'latest' | |
type: choice | |
options: | |
- latest | |
- beta | |
- prev | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: yarn install | |
- name: Publish with ${{ inputs.tag }} | |
run: npm publish -w express-zod-api --provenance --tag ${{ inputs.tag }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_KEY}} |