Skip to content

Modernize GitHub workflows (#48) #1

Modernize GitHub workflows (#48)

Modernize GitHub workflows (#48) #1

Workflow file for this run

name: Release & Publish
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 24.x
- name: Extract pnpm version and install
run: |
VERSION=$(cat package.json | grep '"packageManager": "pnpm@' | sed 's/.*"pnpm@\([^"]*\)".*/\1/')
npm install -g pnpm@$VERSION
- name: Cache pnpm modules
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Run Changeset Workflow
uses: changesets/action@c48e67d110a68bc90ccf1098e9646092baacaa87 # v1.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
publish: pnpm changeset publish
commitMode: github-api