-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
77 lines (64 loc) · 2.25 KB
/
changesets.yml
File metadata and controls
77 lines (64 loc) · 2.25 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
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Changesets Release
on:
push:
branches:
- next
concurrency:
group: changesets-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
packages: write
id-token: write
pull-requests: write
jobs:
release:
name: Changesets Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcb5dd907a8 # v5
with:
fetch-depth: 0
token: ${{ secrets.GIT_TOKEN }}
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: '24'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Re-install npm
# TODO: OIDC requires npm >=11.5.1.
# Until Node.js v24 is LTS (with npm 11 as the default), we need to bump.
run: npm install -g npm@11
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'chore(release): version packages'
title: 'chore(release): version packages'
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Sync to cnpm
if: steps.changesets.outputs.published == 'true'
run: node scripts/sync-cnpm.js
- name: Summary
if: steps.changesets.outputs.published == 'true'
run: |
echo "## 🎉 Release Summary" >> $GITHUB_STEP_SUMMARY
echo "### ✅ Packages Published" >> $GITHUB_STEP_SUMMARY
echo '```json' >> $GITHUB_STEP_SUMMARY
echo '${{ steps.changesets.outputs.publishedPackages }}' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY