Skip to content

Commit 9ca084d

Browse files
committed
ci: fix version bump during publish
There were two issues: - I forgot to "Configure GitHub User" before `npm version`, so it failed when it tried to commit the version bump. - The version bump script didn't `set -e`, so the commit failure didn't interrupt the script and didn't cause a job failure.
1 parent 86d982b commit 9ca084d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232

3333
- uses: ./.github/actions/install-dependencies
3434

35+
- name: Configure GitHub User
36+
shell: bash
37+
run: |
38+
git config --global user.name 'GitHub Actions'
39+
git config --global user.email 'github-actions@localhost'
40+
3541
- name: Bump Version
3642
shell: bash
3743
env:

scripts/npm-version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
35
# `npm version 1.2.3` does the following:
46
# 1. Update `/package.json` and `/package-lock.json` with the new version
57
# 2. `git add package.json package-lock.json`

0 commit comments

Comments
 (0)