From dd4fd22896d5c87026d6c5d3a80c3bb131030be4 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 1 Nov 2023 10:49:46 -0400 Subject: [PATCH] update workflows --- .github/workflows/deploy.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c159b2a..cac6935 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,11 +31,10 @@ jobs: - name: Set Release Version run: | RELEASE_VERSION=${GITHUB_REF#refs/tags/v} - re=[0-9]+\.[0-9]+\.[0-9]+ - if [[ $RELEASE_VERSION =~ $re ]]; then - echo "GEM_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + if [[ $RELEASE_VERSION =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(beta|alpha|rc))(\.[0-9][0-9]*)?$ ]]; then + echo "PACKAGE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV else - echo "Tag does not match expected semver regex pattern (v$re)" + echo 'Tag does not match expected semver regex pattern (^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(beta|alpha|rc))(\.[0-9][0-9]*)?$)' echo $RELEASE_VERSION echo 'Please update your tag to match the expected regex pattern' exit 1 @@ -51,12 +50,12 @@ jobs: - name: Install Packages and Test run: | - yarn - yarn test + npm i + npm test - name: Publish npm Package run: | - npm version $RELEASE_VERSION --no-git-tag-version + npm version $PACKAGE_VERSION --no-git-tag-version npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}