Publish #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
env: | |
PNPM_VERSION: 9.4.0 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version bump" | |
required: true | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
default: "patch" | |
concurrency: | |
group: publish-${{ github.ref }} | |
cancel-in-progress: false | |
# see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Setup Project" | |
uses: ./.github/actions/setup-project | |
- name: "Quality Check" | |
uses: ./.github/actions/quality-check | |
- name: "Set commit identity" | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "<>" | |
- name: "NPM Identity" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
- name: Publish to GitHub Package Registry | |
run: | | |
pnpm version-prepare | |
lerna publish -y --no-private --no-verify-access ${{inputs.version}} |