Skip to content

Commit b19ade3

Browse files
committed
fix: yaml syntax in github actions workflows
- Quote name values containing colons to fix YAML parsing - Remove heredoc syntax in dev-release.yml, use inline node -e instead
1 parent 0160cc5 commit b19ade3

2 files changed

Lines changed: 4 additions & 20 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,7 @@ jobs:
7474
run: bun install
7575

7676
- name: Set package.json version (dev)
77-
run: |
78-
node - <<'NODE'
79-
const fs = require('node:fs')
80-
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'))
81-
pkg.version = process.env.DEV_VERSION
82-
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n')
83-
NODE
84-
env:
85-
DEV_VERSION: ${{ needs.compute-version.outputs.dev_version }}
77+
run: node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));p.version='${{ needs.compute-version.outputs.dev_version }}';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
8678

8779
- name: Build binary
8880
run: bun build src/entrypoints/index.ts --compile --target=${{ matrix.target }} --format=esm --outfile=${{ matrix.asset }}
@@ -122,15 +114,7 @@ jobs:
122114
run: bun install
123115

124116
- name: Set package.json version (dev)
125-
run: |
126-
node - <<'NODE'
127-
const fs = require('node:fs')
128-
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'))
129-
pkg.version = process.env.DEV_VERSION
130-
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n')
131-
NODE
132-
env:
133-
DEV_VERSION: ${{ needs.compute-version.outputs.dev_version }}
117+
run: node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));p.version='${{ needs.compute-version.outputs.dev_version }}';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
134118

135119
- name: Typecheck
136120
run: bun run typecheck
@@ -144,7 +128,7 @@ jobs:
144128
- name: Prepublish check
145129
run: bun run scripts/prepublish-check.js
146130

147-
- name: Publish npm (dist-tag: dev)
131+
- name: "Publish npm (dist-tag: dev)"
148132
run: npm publish --tag dev --access public --ignore-scripts
149133
env:
150134
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
- name: Prepublish check
127127
run: bun run scripts/prepublish-check.js
128128

129-
- name: Publish npm (dist-tag: latest)
129+
- name: "Publish npm (dist-tag: latest)"
130130
run: npm publish --access public --ignore-scripts
131131
env:
132132
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)