11name : Release
22
33on :
4+ pull_request :
5+ branches :
6+ - main
47 push :
58 paths-ignore :
69 - ' docs/**'
1114 - main
1215
1316jobs :
17+ release-canary :
18+ name : Canary Release
19+ runs-on : ubuntu-24.04
20+ permissions :
21+ contents : read
22+ id-token : write
23+ if : >-
24+ ${{
25+ github.event_name == 'pull_request' &&
26+ github.event.pull_request.head.repo.full_name == github.repository &&
27+ github.actor != 'dependabot[bot]' &&
28+ github.actor != 'dependabot-preview[bot]' &&
29+ github.actor != 'renovate[bot]'
30+ }}
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v4
34+ with :
35+ fetch-depth : 0
36+ ref : ${{ github.event.pull_request.head.sha }}
37+
38+ - name : Setup pnpm
39+ 40+ with :
41+ run_install : false
42+
43+ - name : Setup Node.js
44+ uses : actions/setup-node@v4
45+ with :
46+ node-version : 24
47+ cache : ' pnpm'
48+ registry-url : ' https://registry.npmjs.org'
49+
50+ - name : Ensure npm supports OIDC trusted publishing
51+ run : npm install -g npm@latest
52+
53+ - name : Setup pnpm store
54+ id : pnpm-store
55+ run : |
56+ echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
57+
58+ - name : Setup pnpm cache
59+ uses : actions/cache@v4
60+ with :
61+ path : ${{ steps.pnpm-store.outputs.STORE_PATH }}
62+ key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
63+ restore-keys : |
64+ ${{ runner.os }}-pnpm-store-
65+
66+ - name : Install Dependencies
67+ run : pnpm i --frozen-lockfile
68+
69+ - name : Create snapshot versions
70+ run : pnpm exec changeset version --snapshot canary
71+ env :
72+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73+
74+ - name : Build
75+ run : pnpm run build
76+
77+ - name : Publish canary
78+ run : pnpm exec changeset publish --no-git-tag --tag canary
79+ env :
80+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81+
1482 release :
1583 name : Release
1684 runs-on : ubuntu-latest
85+ if : ${{ github.event_name == 'push' }}
1786 steps :
1887 - name : Checkout
1988 uses : actions/checkout@v4
@@ -29,17 +98,18 @@ jobs:
2998 - name : Setup Node.js
3099 uses : actions/setup-node@v4
31100 with :
32- node-version : 22
101+ node-version : 24
33102 cache : ' pnpm'
34103
35104 - name : Setup pnpm store
105+ id : pnpm-store
36106 run : |
37- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
107+ echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
38108
39109 - name : Setup pnpm cache
40110 uses : actions/cache@v4
41111 with :
42- path : ${{ env .STORE_PATH }}
112+ path : ${{ steps.pnpm-store.outputs .STORE_PATH }}
43113 key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
44114 restore-keys : |
45115 ${{ runner.os }}-pnpm-store-
0 commit comments