Skip to content

Manual Package Publish #3

Manual Package Publish

Manual Package Publish #3

name: Manual Package Publish
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to publish from'
required: true
default: 'main'
jobs:
publish-package:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-node@v4
with:
node-version: 20
token: ${{ secrets.GHA_TOKEN }}
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GHA_TOKEN }}