Skip to content

Commit 44e9970

Browse files
author
skychx
committed
ci(config): changeset
1 parent d08083e commit 44e9970

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ on:
66
- 'v*'
77

88
permissions:
9-
id-token: write # Required for OIDC
10-
contents: write
9+
id-token: write # OpenID Connect token needed for provenance
10+
contents: write # to create release (changesets/action)
11+
pull-requests: write # to create pull request (changesets/action)
1112

1213
jobs:
1314
publish:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout code repository
1718
uses: actions/checkout@v4
19+
with:
20+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
21+
fetch-depth: 0
1822

1923
- name: Setup pnpm
2024
uses: pnpm/action-setup@v4
@@ -33,7 +37,7 @@ jobs:
3337
run: pnpm install --global [email protected]
3438

3539
- name: Install dependencies
36-
run: pnpm install
40+
run: pnpm install --frozen-lockfile
3741

3842
- name: Style check
3943
run: pnpm run format:check
@@ -44,8 +48,7 @@ jobs:
4448
- name: Create and publish versions
4549
uses: changesets/action@v1
4650
with:
47-
commit: 'chore: update versions'
48-
title: 'chore: update versions'
49-
publish: pnpm publish -r --no-git-checks
51+
version: pnpm changeset:version
52+
publish: pnpm changeset:release
5053
env:
5154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"test:watch": "vitest",
1111
"format": "prettier . --write",
1212
"format:check": "prettier . --check",
13+
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
14+
"changeset:release": "changeset publish",
1315
"prepare": "husky"
1416
},
1517
"keywords": [],

0 commit comments

Comments
 (0)