From cd059b4717c6f91e93aa976c270bb1777120f821 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Thu, 22 Feb 2024 12:40:52 +0100 Subject: [PATCH] check the version --- .github/workflows/manual-publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 9f4d753a69..0404596ceb 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -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 { @@ -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"