Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoegel committed Nov 1, 2023
1 parent 752213d commit dd4fd22
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit dd4fd22

Please sign in to comment.