diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..d0cd602 --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -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 }}