Skip to content

Commit 9212624

Browse files
authored
Bump version in package.json on publish (#669)
1 parent d99e869 commit 9212624

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/npmpublish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ jobs:
2121
node-version: 20
2222
registry-url: https://registry.npmjs.org/
2323
- run: npm ci
24-
- run: npm publish --provenance
24+
- name: Set version from release tag
25+
run: |
26+
VERSION="${{ github.event.release.tag_name }}"
27+
VERSION="${VERSION#v}"
28+
jq --arg v "$VERSION" '.version = $v' package.json > package.json.tmp && mv package.json.tmp package.json
29+
- run: npm publish --provenance

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "esp-web-tools",
3-
"version": "10.2.0",
3+
"version": "0.0.0",
44
"description": "Web tools for ESP devices",
55
"main": "dist/install-button.js",
66
"repository": "https://github.com/esphome/esp-web-tools",

0 commit comments

Comments
 (0)