Commit 5589b78
committed
ci(stable-release): make version bump idempotent
`npm version <X> --no-git-tag-version` errors when the package.json
version is already <X> — which is what happens when the version was
bumped in a PR before the release workflow runs. The v0.2.0 dispatch
hit this and the run died at the bump step.
- Replace `npm version` with `npm pkg set "version=$VERSION"` which
is a no-op when the value is already correct.
- Skip the version-bump commit if package.json/lock are unchanged after
staging (still tag + push). Otherwise `git commit` errors with
"nothing to commit".1 parent 677ef45 commit 5589b78
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
| |||
0 commit comments