Skip to content

Commit

Permalink
Add tag validations
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelangelmorenochacon committed Jul 1, 2024
1 parent 42b38c0 commit 7ab1673
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

###
# Build
###

# - name: Set up Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
Expand All @@ -51,6 +55,22 @@ jobs:
# - name: Test
# run: yarn test

###
# Release
###

- name: Check tag format
id: check-tag-format
if: startsWith(github.ref, 'refs/tags/')
uses: nowsprinting/check-version-format-action@v4
with:
prefix: 'v'

- name: Check if tag format is valid
if: startsWith(github.ref, 'refs/tags/') && steps.check-tag-format.outputs.is_valid == 'false'
run: |
echo "Invalid tag format, it must follow SemVer. Aborting." && exit 1
- name: Get release type
if: startsWith(github.ref, 'refs/tags/')
id: get-release-type
Expand Down

0 comments on commit 7ab1673

Please sign in to comment.