Skip to content

Commit

Permalink
attempt to fix release tag with branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecarr committed Oct 5, 2024
1 parent 876d85b commit 67d9869
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Release
on:
push:
tags:
- 'v*.*.*' # This triggers the workflow on tags following semantic versioning
- 'v*.*.*' # Trigger on semantic versioning tags

jobs:
build:
Expand Down Expand Up @@ -36,22 +36,15 @@ jobs:
- name: Create Release
id: create_release
run: |
if [[ "${GITHUB_REF}" == "refs/tags/v"* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/}
if [[ "${GITHUB_REF}" == "refs/tags/v"* ]]; then
echo "Creating release for tag $TAG_NAME"
echo "GITHUB_REF=$GITHUB_REF" >> $GITHUB_ENV
fi
else
echo "Not a valid tag, skipping release creation."
exit 0
fi
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "Creating release for tag $TAG_NAME"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Upload Package to Release
if: steps.create_release.outputs.tag_name != ''
if: startsWith(github.ref, 'refs/tags/v') # Run this step if the tag starts with 'v'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.create_release.outputs.tag_name }}
tag_name: ${{ env.TAG_NAME }}
files: |
dist/*
env:
Expand Down

0 comments on commit 67d9869

Please sign in to comment.