bug #2952 Fix package.json files to not use "catalog" feature from PN… #9
Workflow file for this run
This file contains hidden or 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: Release on NPM | |
on: | |
push: | |
tags: | |
- 'v2.*.*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 2.x | |
- name: Configure Git | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Extract version from tag | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- run: npm i -g corepack && corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
cache-dependency-path: | | |
pnpm-lock.yaml | |
package.json | |
src/**/package.json | |
- run: pnpm install --frozen-lockfile | |
- name: Update version of JS packages | |
run: pnpm version ${{ env.VERSION }} --no-git-tag-version --workspaces --no-workspaces-update | |
- name: Commit changes | |
run: | | |
git add . | |
git commit -m "Update versions to ${{ env.VERSION }}" | |
- name: Publish on NPM | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
run: pnpm publish --recursive --access public --no-git-checks | |
- name: Push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: git push origin 2.x |