Skip to content

Commit 89d89b3

Browse files
committed
chore: publish workflows
1 parent 80e605d commit 89d89b3

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

.github/workflows/publish-canary.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release to NPM Canary
2+
3+
permissions:
4+
contents: write
5+
6+
on: workflow_dispatch
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: 9
22+
23+
- name: Install dependencies
24+
run: pnpm build:prepare
25+
- name: Build
26+
run: pnpm build
27+
28+
- name: Version changesets
29+
run: pnpm changeset version --snapshot canary
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Publish to npm canary
34+
id: changesets
35+
uses: changesets/action@v1
36+
with:
37+
publish: pnpm changeset publish --tag canary
38+
createGithubReleases: false
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ jobs:
3636
title: "chore: bump packages version"
3737
commit: "chore: bump packages version"
3838
version: pnpm run version
39-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
40-
publish: pnpm run publish
39+
publish: pnpm changeset publish
4140
env:
4241
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4342
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)