Skip to content

Commit

Permalink
fix: siwtch env
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Sep 26, 2023
1 parent 82e513f commit 1dea734
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
Expand Down
16 changes: 16 additions & 0 deletions scripts/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,24 @@ const basicFiles = [
replace: (oldRuntime: IRuntime, newRuntime: IRuntime, content: string) => {
if (oldRuntime.npm === "npm" && newRuntime.npm === "bun") {
content = content.replaceAll(`${oldRuntime.npm} ci`, `${newRuntime.npm} install --frozen-lockfile`)
content = content.replaceAll(
` - name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"`,
` - name: Install bun
uses: oven-sh/setup-bun@v1`
)
} else if (oldRuntime.npm === "bun" && newRuntime.npm === "npm") {
content = content.replaceAll(`${oldRuntime.npm} install --frozen-lockfile`, `${newRuntime.npm} ci`)
content = content.replaceAll(
` - name: Install bun
uses: oven-sh/setup-bun@v1`,
` - name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"`
)
}
return content.replaceAll(`${oldRuntime.npx} `, `${newRuntime.npx} `)
},
Expand Down

0 comments on commit 1dea734

Please sign in to comment.