Skip to content

Commit 0dcb6c1

Browse files
authored
Merge pull request #5 from danylaksono/placements
fix semver
2 parents 9412b85 + 8b95fdf commit 0dcb6c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ jobs:
2929
- name: Build
3030
run: npm run build
3131

32+
- name: Stamp version with build number
33+
run: |
34+
node - <<'EOF'
35+
const fs = require('fs');
36+
const pkgPath = './package.json';
37+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
38+
const coreVersion = pkg.version.split('+')[0];
39+
pkg.version = `${coreVersion}+build.${process.env.GITHUB_RUN_NUMBER}`;
40+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
41+
EOF
42+
3243
- name: Determine versions
3344
id: versions
3445
run: |

0 commit comments

Comments
 (0)