Skip to content

Commit

Permalink
Merge branch 'master' into release/dencun
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Aug 24, 2023
2 parents 33633d5 + fa736ba commit 73915ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ jobs:
ref: ${{ github.ref }}
- name: Derive release suffix from tag (if it exists)
run: |
# Strip the 'refs/tags/' prefix
TAG_NAME=${GITHUB_REF#refs/tags/}
# Extract suffix from tag name after the last '-' (e.g., 'dencun' from 'v1.0.0-dencun')
RELEASE_SUFFIX=${GITHUB_REF##*-}
RELEASE_SUFFIX=${TAG_NAME##*-}
# Check if we are dealing with a pure version (no suffix)
if [[ $RELEASE_SUFFIX == v* ]]; then
# Check if the suffix is still a version pattern (e.g., 'v0.0.44'), in which case there's no suffix
if [[ $RELEASE_SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
RELEASE_SUFFIX=""
fi
echo "RELEASE_SUFFIX=$RELEASE_SUFFIX" >> $GITHUB_ENV
echo "Release suffix: $RELEASE_SUFFIX"
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down

0 comments on commit 73915ab

Please sign in to comment.