Skip to content

Commit cc85de0

Browse files
committed
build: add changeset
1 parent 70c5b83 commit cc85de0

File tree

7 files changed

+661
-112
lines changed

7 files changed

+661
-112
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["docs", "example"]
11+
}

.changeset/upset-cooks-lie.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"msw-dev-tool": major
3+
---
4+
5+
- Migrate pnpm to yarn.
6+
- Change package release workflow.
7+
- Change lockfile.

.github/workflows/deploy-package.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
packages: write
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 20
26+
registry-url: "https://registry.npmjs.org"
27+
28+
- name: Setup Yarn
29+
run: |
30+
corepack enable
31+
corepack prepare yarn@4.5.3 --activate
32+
33+
- name: Install Dependencies
34+
run: yarn install
35+
36+
- name: Build Packages
37+
run: yarn build
38+
39+
- name: Create .npmrc file
40+
run: |
41+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
42+
43+
- name: Publish
44+
id: changesets
45+
uses: changesets/action@v1
46+
with:
47+
version: yarn version-packages
48+
publish: yarn changeset publish
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
"dev": "yarn workspace docs dev",
99
"build": "yarn workspaces run build",
1010
"lint": "yarn workspaces run lint",
11-
"test": "yarn workspaces run test"
11+
"test": "yarn workspaces run test",
12+
"changeset": "changeset",
13+
"version-packages": "changeset version"
1214
},
1315
"devDependencies": {
1416
"typescript": "^5.0.0"
1517
},
16-
"packageManager": "yarn@4.5.3"
18+
"packageManager": "yarn@4.5.3",
19+
"dependencies": {
20+
"@changesets/cli": "^2.28.1"
21+
}
1722
}

packages/msw-dev-tool/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@
7272
"immer": "^10.1.1",
7373
"lodash": "^4.17.21",
7474
"vaul": "^1.1.2"
75+
},
76+
"publishConfig": {
77+
"access": "public"
7578
}
7679
}

0 commit comments

Comments
 (0)