Skip to content

Manual Publish

Manual Publish #4

Workflow file for this run

name: Manual Publish
on:
workflow_dispatch:
inputs:
bump:
description: 'Next Bump'
required: true
type: choice
options:
- 'major'
- 'minor'
- 'patch'
- 'premajor'
- 'preminor'
- 'prepatch'
- 'prerelease'
jobs:
publish_npm:
name: Publish to NPM
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm
registry-url: 'https://registry.npmjs.org'
- name: NPM Install
run: npm ci
- name: NPM Build
run: npm run build
- name: NPM Test
run: npm test
- name: Lerna Publish
run: npx lerna publish ${{ github.event.inputs.bump }} -y
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}