Skip to content

Commit c524889

Browse files
committed
feat: publish changesets if available
1 parent a6ff339 commit c524889

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ jobs:
2828
- name: Install dependencies
2929
run: pnpm install
3030

31-
- name: Create Release Pull Request
31+
- name: Build packages
32+
run: pnpm run build
33+
34+
- name: Create Release Pull Request or NPM Publish
35+
id: changesets
3236
uses: changesets/action@v1
3337
env:
3438
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3540
with:
3641
# Note: pnpm install after versioning is necessary to refresh lockfile
3742
version: pnpm run version
43+
publish: pnpm exec changeset publish
3844
commit: "[ci] release"
3945
title: "[ci] release"
4046

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"lint:apply": "biome lint packages/* --apply",
1414
"format": "biome format",
1515
"format:write": "biome format --write",
16-
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run check",
17-
"release": "pnpm build && changeset publish"
16+
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run check"
1817
},
1918
"keywords": ["withastro"],
2019
"author": "bholmesdev",

0 commit comments

Comments
 (0)