Skip to content

Commit dfe657d

Browse files
teallarsonclaude
andcommitted
fix: migrate CI and release workflows fully to bun
- Replace npm ci/install with bun install across all jobs - Replace npm run with bun run for lint, build, typecheck, format - Use bun pm pack + npm publish for release (workaround for bun not supporting --provenance, per oven-sh/bun#15601) - Replace node with bun for script execution in smoke tests - Update paths-filter to watch bun.lock instead of package-lock.json - Remove npm-specific env vars (NPM_CONFIG_AUDIT, etc.) - Keep actions/setup-node only where npm registry auth is needed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7f7b7f7 commit dfe657d

File tree

2 files changed

+14
-31
lines changed

2 files changed

+14
-31
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- "src/**"
3232
- "templates/_shared/**"
3333
- "package.json"
34-
- "package-lock.json"
34+
- "bun.lock"
3535
- "tsconfig.json"
3636
- "eslint.config.mjs"
3737
- ".prettierrc"
@@ -48,21 +48,14 @@ jobs:
4848
runs-on: ubuntu-latest
4949
needs: changes
5050
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.ai_sdk == 'true' || needs.changes.outputs.mastra == 'true' || needs.changes.outputs.langchain == 'true' }}
51-
env:
52-
NPM_CONFIG_AUDIT: "false"
53-
NPM_CONFIG_FUND: "false"
54-
NPM_CONFIG_PREFER_OFFLINE: "true"
5551
steps:
5652
- uses: actions/checkout@v4
57-
- uses: actions/setup-node@v4
58-
with:
59-
node-version: 22
60-
cache: npm
61-
- run: npm ci
62-
- run: npm run lint
63-
- run: npm run format:check
64-
- run: npm run typecheck
65-
- run: npm run build
53+
- uses: oven-sh/setup-bun@v2
54+
- run: bun install
55+
- run: bun run lint
56+
- run: bun run format:check
57+
- run: bun run typecheck
58+
- run: bun run build
6659
- name: Upload built CLI artifact
6760
uses: actions/upload-artifact@v4
6861
with:
@@ -90,23 +83,14 @@ jobs:
9083
needs: [changes, lint-and-build]
9184
if: ${{ needs.changes.outputs.core == 'true' || (matrix.template == 'ai-sdk' && needs.changes.outputs.ai_sdk == 'true') || (matrix.template == 'mastra' && needs.changes.outputs.mastra == 'true') || (matrix.template == 'langchain' && needs.changes.outputs.langchain == 'true') }}
9285
env:
93-
NPM_CONFIG_AUDIT: "false"
94-
NPM_CONFIG_FUND: "false"
95-
NPM_CONFIG_PREFER_OFFLINE: "true"
9686
PIP_DISABLE_PIP_VERSION_CHECK: "1"
9787
strategy:
9888
fail-fast: false
9989
matrix:
10090
template: [ai-sdk, mastra, langchain]
10191
steps:
10292
- uses: actions/checkout@v4
103-
- uses: actions/setup-node@v4
104-
with:
105-
node-version: 22
10693
- uses: oven-sh/setup-bun@v2
107-
if: matrix.template != 'langchain'
108-
with:
109-
bun-version: latest
11094
- name: Cache bun packages
11195
if: matrix.template != 'langchain'
11296
uses: actions/cache@v4
@@ -122,15 +106,15 @@ jobs:
122106
python-version: "3.12"
123107
cache: pip
124108
cache-dependency-path: templates/langchain/requirements.txt
125-
- run: npm ci
109+
- run: bun install
126110
- name: Download built CLI artifact
127111
uses: actions/download-artifact@v4
128112
with:
129113
name: cli-dist
130114
path: dist
131115

132116
- name: Scaffold template
133-
run: node dist/index.js ci-test-${{ matrix.template }} --template ${{ matrix.template }}
117+
run: bun dist/index.js ci-test-${{ matrix.template }} --template ${{ matrix.template }}
134118

135119
- name: Create .env from example
136120
working-directory: ci-test-${{ matrix.template }}

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ jobs:
1414
name: Tag & Publish
1515
runs-on: ubuntu-latest
1616
environment: npm
17-
env:
18-
NPM_CONFIG_AUDIT: "false"
19-
NPM_CONFIG_FUND: "false"
2017
steps:
2118
- uses: actions/checkout@v4
2219
- uses: oven-sh/setup-bun@v2
@@ -29,7 +26,7 @@ jobs:
2926
- name: Check if version changed
3027
id: version
3128
run: |
32-
LOCAL=$(node -p "require('./package.json').version")
29+
LOCAL=$(bun -e "console.log(require('./package.json').version)")
3330
REMOTE=$(npm view @arcadeai/create-agent version 2>/dev/null || echo "0.0.0")
3431
echo "local=$LOCAL" >> "$GITHUB_OUTPUT"
3532
if [ "$LOCAL" != "$REMOTE" ]; then
@@ -40,11 +37,13 @@ jobs:
4037
4138
- name: Build
4239
if: steps.version.outputs.changed == 'true'
43-
run: npm run build
40+
run: bun run build
4441

4542
- name: Publish to npm
4643
if: steps.version.outputs.changed == 'true'
47-
run: npm publish --access public --provenance
44+
run: |
45+
TARBALL=$(bun pm pack --quiet)
46+
npm publish "$TARBALL" --access public --provenance
4847
4948
- name: Create GitHub Release
5049
if: steps.version.outputs.changed == 'true'

0 commit comments

Comments
 (0)