Skip to content

Commit f0bce64

Browse files
committed
ci: use bun to handle workspace protocol during publish
- Alias npm to bun in CI to enable bun's automatic workspace:* replacement - Update publish scripts to bypass changeset's npm-only limitation - Ensure internal dependencies are correctly versioned on NPM
1 parent 2d87112 commit f0bce64

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.changeset/sweet-pots-itch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@thaterror/core": patch
3+
"@thaterror/pino-adapter": patch
4+
---
5+
6+
fix: resolve workspace protocol in package.json during release

.github/workflows/changeset-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Professional Release Workflow
1+
name: Changeset Release Workflow
22

33
on:
44
# Phase 1: Manual trigger to prepare the Release PR
@@ -32,6 +32,12 @@ jobs:
3232
- name: Install Dependencies
3333
run: bun install
3434

35+
- name: Alias npm to bun
36+
run: |
37+
mkdir -p $HOME/.local/bin
38+
ln -s $(which bun) $HOME/.local/bin/npm
39+
echo "$HOME/.local/bin" >> $GITHUB_PATH
40+
3541
- name: Create PR or Publish
3642
id: changesets
3743
uses: changesets/action@v1
@@ -44,6 +50,7 @@ jobs:
4450

4551
# Automatically create the GitHub Release UI page
4652
createGithubReleases: true
53+
4754
env:
4855
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4956
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"syncpack:fix": "syncpack fix-mismatches",
2828
"precommit:check": "bun test && bun run lint:check && bun run type-check && bun run syncpack:list",
2929
"install:clean": "bun pm cache rm && bunx rimraf bun.lock bun.lockb && bun install",
30-
"version": "changeset version && bun install",
30+
"version": "changeset version && bun update --lockfile-only",
3131
"release": "changeset publish",
3232
"change": "changeset"
3333
}

0 commit comments

Comments
 (0)