-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.09 KB
/
changesets.yml
File metadata and controls
64 lines (55 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Opens / refreshes a "Version Packages" PR whenever a push to main introduces
# new `.changeset/*.md` entries. When that PR merges, `package.json` versions
# and per-package CHANGELOG.md files are committed to main. The existing
# `publish` workflow then picks up the version bumps and publishes to npm.
#
# This split (version here, publish in publish.yml) is intentional: the publish
# workflow already implements "publish iff version differs from npm" so it
# composes cleanly without changesets/action's `publish:` input.
name: changesets
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: changesets-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
jobs:
release-pr:
name: open version PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # changesets needs full history to compute the changelog
- name: Setup pnpm
# pnpm/action-setup v4.0.0
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v4.0.0
with:
version: 9.15.0
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create or update Version Packages PR
# changesets/action v1.8.0
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
with:
# `version` runs `changeset version` which bumps package.json files
# and writes per-package CHANGELOG.md. We re-run `pnpm install` after
# to refresh the lockfile against the bumped workspace versions.
version: pnpm run changeset:version
title: "chore: version packages"
commit: "chore: version packages"
# No `publish:` input — publish.yml handles the actual npm publish
# once the Version Packages PR is merged.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}