Skip to content

Commit

Permalink
do not extract version & package 2x (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel authored Oct 25, 2024
1 parent 0b98e39 commit d6c51cb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/release-go-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
id: extract_package_name
run: |
TAG_REF="${GITHUB_REF#refs/tags/}"
PACKAGE_NAME=$(echo "$TAG_REF" | cut -d'/' -f1)
VERSION=$(echo "$TAG_REF" | cut -d'/' -f2)
PACKAGE_NAME="${TAG_REF%/*}"
VERSION="${TAG_REF##*/}"
echo "Tag Reference: $TAG_REF"
echo "Package Name: $PACKAGE_NAME"
echo "Version: $VERSION"
Expand All @@ -41,11 +41,6 @@ jobs:
- name: Find Last Tag for Package and Generate Release Notes
id: generate_release_notes
run: |
# Extract the package name and version from the tag
TAG_REF="${GITHUB_REF#refs/tags/}"
PACKAGE_NAME="${TAG_REF%/*}"
VERSION="${TAG_REF##*/}"
# Find the latest tag for the same package that is not the current tag
LAST_TAG=$(git describe --abbrev=0 --always --match "$PACKAGE_NAME/v*" --tags $(git rev-list --tags --skip=1 --max-count=1))
echo "Last tag: ${LAST_TAG}"
Expand Down

0 comments on commit d6c51cb

Please sign in to comment.