Skip to content

Commit 3181400

Browse files
committed
chore: Add canary release workflow
1 parent 75ec8ce commit 3181400

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
id-token: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [22]
18+
steps:
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: '22.x'
22+
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Prepare repository
27+
run: git fetch --unshallow --tags
28+
29+
- name: Cache node modules
30+
uses: actions/cache@v4
31+
with:
32+
path: node_modules
33+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
34+
35+
- name: install
36+
run: |
37+
yarn
38+
39+
- name: Create canary release
40+
if: github.event_name == 'pull_request'
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
run: yarn release:canary

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"lint": "eslint src stories",
5858
"prerelease": "run lint && run test && run build",
5959
"release": "publish . --access public",
60-
"release:canary": "build && auto canary",
60+
"release:canary": "run build && auto canary",
6161
"storybook": "storybook dev -p 9001",
6262
"test": "jest src"
6363
},

0 commit comments

Comments
 (0)