Skip to content

Commit d3ff442

Browse files
committed
ci: set version from tag
1 parent b1b5afe commit d3ff442

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
with:
2222
bun-version: "1.3.8"
2323

24+
- name: Set package version from tag
25+
run: |
26+
node -e "const fs=require('fs');const tag=process.env.GITHUB_REF_NAME||'';const version=tag.startsWith('v')?tag.slice(1):tag;if(!version){throw new Error('Missing tag version');}const path='package.json';const pkg=JSON.parse(fs.readFileSync(path,'utf8'));pkg.version=version;fs.writeFileSync(path,JSON.stringify(pkg,null,2)+'\n');"
27+
2428
- name: Install dependencies
2529
run: bun install
2630

0 commit comments

Comments
 (0)