Skip to content

Publish Package

Publish Package #2

name: NPM Publication On GitHub Packages
on:
workflow_dispatch:
inputs:
publish:
description: 'Trigger package publication'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: cd ./cli && npm ci
publish-gpr:
if:
github.event_name == 'workflow_dispatch' && github.event.inputs.publish ==
'true'
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: cd ./cli && npm ci
- run: cd ./cli && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}