Skip to content

Update pnpm Version

Update pnpm Version #7

name: Update pnpm Version
on:
schedule:
- cron: '0 23 * * 2' # Weekly on Tuesday afternoons (UTC)
workflow_dispatch:
jobs:
update-pnpm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Get latest pnpm version
run: |
PNPM_VERSION="$(npm view pnpm version)" # get the latest version of pnpm from the registry
echo ${PNPM_VERSION}
echo "pnpm_version=${PNPM_VERSION}" >> $GITHUB_ENV
- name: Update package.json
run: |
jq '.packageManager = "pnpm@'"${{ env.pnpm_version }}"'"' package.json > temp.json
mv temp.json package.json
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PAT }}
commit-message: Update PNPM to v${{ env.pnpm_version }}
title: Update PNPM to v${{ env.pnpm_version }}
body: |
Update PNPM to v${{ env.pnpm_version }} the latest release.
branch: update-pnpm-version
labels: dependencies
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.PAT }}