Skip to content

Commit

Permalink
feat: add ability to trigger publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sfopsbot authored and azlam-abdulsalam committed Aug 6, 2024
1 parent 606ea6e commit 95c458a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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 }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
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 }}

0 comments on commit 95c458a

Please sign in to comment.