Skip to content

Commit

Permalink
check the version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Feb 22, 2024
1 parent 6a1ad1d commit cd059b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
const version = manifest.version;
core.setOutput('version', version);
const alpha = version.includes('alpha');
core.setOutput('alpha', alpha);
core.setOutput('alpha', alpha || '');
const validVersion = /^\d+\.\d+\.\d+$/.test(version);
core.setOutput('validVersion', validVersion || '');
return {
Expand All @@ -62,6 +62,12 @@ jobs:
validVersion: ${{ steps.version.outputs.validVersion }}
versionInfo: ${{ toJSON(steps.version.outputs) }}
- name: Check Version
if: ${{ steps.version.outputs.validVersion != 'true' }}
run: |
echo "::error title=Invalid Version::The version in package.json is not a releasable version."
exit 1
- name: Test Exit
run: |
echo "::error title=Test::This is a test error"
Expand Down

0 comments on commit cd059b4

Please sign in to comment.