From e9f379f57026afdaef75b0836e5a6fe94d456d97 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Thu, 19 Oct 2023 14:07:38 +1000 Subject: [PATCH] fixinig precheck --- .github/workflows/publish.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a3b9e67..caae865 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -18,9 +18,12 @@ jobs: registry-url: 'https://registry.npmjs.org' - run: | PACKAGE_VERSION=`npm version | sed -rn "2 s/.*: '([^']*)'.*/\1/g; 2 p"` + echo '$GITHUB_REF' = "$GITHUB_REF" + echo '$PACKAGE_VERSION' = "$PACKAGE_VERSION" if [ "$GITHUB_REF" = "v$PACKAGE_VERSION" ] then echo "Package version (v$PACKAGE_VERSION) must match tag (GITHUB_REF: $GITHUB_REF) in order to publish" 1>&2 + exit 1 fi - run: npm ci - run: npm publish