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+ uses : pnpm/action-setup@v4.1.0
40+ with :
41+ version : 10.16.0
42+ run_install : false
43+
44+ - name : Setup Node.js
45+ uses : actions/setup-node@v4
46+ with :
47+ node-version : 24
48+ cache : ' pnpm'
49+ registry-url : ' https://registry.npmjs.org'
50+
51+ - name : Ensure npm supports OIDC trusted publishing
52+ run : npm install -g npm@latest
53+
54+ - name : Setup pnpm store
55+ id : pnpm-store
56+ run : |
57+ echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
58+
59+ - name : Setup pnpm cache
60+ uses : actions/cache@v4
61+ with :
62+ path : ${{ steps.pnpm-store.outputs.STORE_PATH }}
63+ key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
64+ restore-keys : |
65+ ${{ runner.os }}-pnpm-store-
66+
67+ - name : Install Dependencies
68+ run : pnpm i --frozen-lockfile
69+
70+ - name : Create snapshot versions
71+ run : pnpm changeset version --snapshot canary
72+ env :
73+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74+
75+ - name : Build
76+ run : pnpm run build
77+
78+ - name : Publish canary
79+ run : pnpm changeset publish --no-git-tag --tag canary
80+ env :
81+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82+
1483 release :
1584 name : Release
1685 runs-on : ubuntu-latest
86+ if : ${{ github.event_name == 'push' }}
1787 steps :
1888 - name : Checkout
1989 uses : actions/checkout@v4
@@ -29,17 +99,18 @@ jobs:
2999 - name : Setup Node.js
30100 uses : actions/setup-node@v4
31101 with :
32- node-version : 22
102+ node-version : 24
33103 cache : ' pnpm'
34104
35105 - name : Setup pnpm store
106+ id : pnpm-store
36107 run : |
37- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
108+ echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
38109
39110 - name : Setup pnpm cache
40111 uses : actions/cache@v4
41112 with :
42- path : ${{ env .STORE_PATH }}
113+ path : ${{ steps.pnpm-store.outputs .STORE_PATH }}
43114 key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
44115 restore-keys : |
45116 ${{ runner.os }}-pnpm-store-
0 commit comments