Skip to content

Commit

Permalink
Merge pull request #17 from bluegroundltd/chore/fix-gh-release-pipeline
Browse files Browse the repository at this point in the history
chore(release): pipeline fixes
  • Loading branch information
chris-asl authored Dec 1, 2023
2 parents fe33da9 + 9d6505a commit e8ad650
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Release
on:
push:
tags:
- '*'
- 'v*'

jobs:
release-core:
runs-on: ubuntu-latest
Expand All @@ -12,6 +13,13 @@ jobs:
with:
ref: ${{ github.ref }}

- name: Check tag name pattern follows `vX.Y.Z`
run: |
if [[ ! "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag name ($GITHUB_REF) does not match the pattern 'vX.Y.Z'. Exiting."
exit 1
fi
- name: Issue a release only if a tag is based on a merged commit in `main` branch
run: |
tag_commit=$(git rev-parse ${{ github.ref }})
Expand All @@ -21,14 +29,7 @@ jobs:
echo "Tag is based on a merged commit in the main branch"
else
echo "Tag is not based on a merged commit in the main branch. Exiting."
exit 0
fi
- name: Check tag name pattern follows `vX.Y.Z`
run: |
if [[ ! "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag name does not match the pattern 'vX.Y.Z'. Exiting."
exit 0
exit 1
fi
- name: Setup Java
Expand Down

0 comments on commit e8ad650

Please sign in to comment.