Skip to content

Commit 1291e37

Browse files
committed
Add validation step to version.yml
Recent run attepts revealed that the action eats up error messages from npm version and silently fails, while outwardly claiming to succeed. This commit seeks to somewhat remedy that by validating the output from npm version to ensure it ran as expected.
1 parent d11ebf8 commit 1291e37

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/version.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,13 @@ jobs:
5252
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
5353
- name: npm version ${{ inputs.version }}
5454
run: echo "version=$(npm version ${{ inputs.version }}${{ startsWith(inputs.version, 'pre') && ' --preid beta' || '' }})" >> "$GITHUB_ENV"
55+
- name: Validate npm version
56+
run: : |
57+
# the above step silently fails, so validate the output was set
58+
if [[ -z ${{ env.version }} ]]; then
59+
exit 1;
60+
else
61+
echo ${{ env.version }}
62+
fi
5563
- name: git push
5664
run: git push && git push origin ${{ env.version }}

0 commit comments

Comments
 (0)