Skip to content

Commit e45c1ff

Browse files
authored
Merge pull request #467 from geotiffjs/themrcam/fix-version.yml
Fix version.yml typo, validate version output
2 parents f3a97ab + 25b0f7b commit e45c1ff

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/version.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
git config --global user.name "${{ github.actor }}"
5252
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
5353
- name: npm version ${{ inputs.version }}
54-
run: echo "version=$(npm version ${{ inputs.version }}${{ startsWith(inputs.version, 'pre') && '--preid beta' || '' }})" >> "$GITHUB_ENV"
54+
run: echo "version=$(npm version ${{ inputs.version }}${{ startsWith(inputs.version, 'pre') && ' --preid beta' || '' }})" >> "$GITHUB_ENV"
55+
- name: Validate npm version
56+
# the above step silently fails, so validate the output was set
57+
run: |
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)