Skip to content

Publish NPM Package #59

Publish NPM Package

Publish NPM Package #59

Workflow file for this run

name: Publish NPM Package
on:
workflow_dispatch:
inputs:
channel:
required: true
type: choice
description: NPM tag to publish the package to
options:
- oldversion
- alpha
- beta
- latest
package:
required: true
type: choice
description: Package to publish
options:
- '@currents/cmd'
- '@currents/jest'
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Publish to NPM
run: |
git config user.name "Currents NPM Bot"
git config user.email "[email protected]"
npm run publish:npm --workspace ${{ github.event.inputs.package }} -- --tag ${{ github.event.inputs.channel }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}