Skip to content

Publish Package to npmjs #14

Publish Package to npmjs

Publish Package to npmjs #14

Workflow file for this run

name: Publish Package to npmjs
on:
workflow_dispatch:
inputs:
options:
description: 'Publish options'
required: true
default: '--dry-run'
type: choice
options:
- '--dry-run'
- '--provenance --access public'
- '--provenance --access public --tag preview'
- '--access public'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: '@vtbag'
- run: npm install -g npm
- run: npm ci
- run: npm run build
- run: npm publish ${OPTIONS}
env:
OPTIONS: ${{ inputs.options }}
NODE_AUTH_TOKEN: ${{ secrets.VTBAG_NPM_TOKEN }}