Skip to content

Commit 22643cf

Browse files
committed
fix: 🐛 corrected workflow for created linked release
1 parent 5648a99 commit 22643cf

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/create-linked-release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# Use the repo variable if it exists, otherwise use the hardcoded default regex.
3131
VERSION_REGEX: ${{ vars.VERSION_REGEX || '^v?[0-9]+\.[0-9]+\.[0-9]+$' }}
3232
run: |
33-
TAG_NAME="${{ steps.get_release_b.outputs.tag }}"
33+
TAG_NAME="${{ steps.get_release_b.outputs.release }}"
3434
if [[ -z "$TAG_NAME" ]]; then
3535
echo "No valid release found from upstream repository. Exiting."
3636
echo "is_valid=false" >> "$GITHUB_OUTPUT"
@@ -50,7 +50,7 @@ jobs:
5050
if: steps.validate_tag.outputs.is_valid == 'true'
5151
env:
5252
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
RELEASE_TAG: ${{ steps.get_release_b.outputs.tag }}
53+
RELEASE_TAG: ${{ steps.get_release_b.outputs.release }}
5454
run: |
5555
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
5656
echo "Release tag '$RELEASE_TAG' already exists. No action needed."
@@ -68,16 +68,14 @@ jobs:
6868
# Use the repo variable for the template if it exists, otherwise use the default.
6969
# Note: We use \n for newlines to keep it a valid one-line expression.
7070
NOTES_TEMPLATE: ${{ vars.RELEASE_NOTE_TEMPLATE || 'This release corresponds to the upstream release in the **{{RepositoryName}}** repository.\n\n**Original Release:** {{URL}}' }}
71-
RELEASE_TAG: ${{ steps.get_release_b.outputs.tag }}
72-
RELEASE_NAME: ${{ steps.get_release_b.outputs.name }}
73-
RELEASE_URL: ${{ steps.get_release_b.outputs.html_url }}
71+
RELEASE_TAG: ${{ steps.get_release_b.outputs.release }}
72+
RELEASE_URL: "https://github.com/${{ vars.UPSTREAM_REPO }}/releases/tag/${{ steps.get_release_b.outputs.html_url }}"
7473
run: |
7574
REPO_NAME_ONLY=${UPSTREAM_REPO#*/}
7675
NOTES_WITH_REPO_NAME="${NOTES_TEMPLATE//'{{RepositoryName}}'/$REPO_NAME_ONLY}"
7776
FINAL_NOTES="${NOTES_WITH_REPO_NAME//'{{URL}}'/$RELEASE_URL}"
7877
7978
gh release create "$RELEASE_TAG" \
80-
--title "$RELEASE_NAME" \
8179
--notes "$FINAL_NOTES"
8280
83-
echo "Successfully created release '$RELEASE_NAME' with tag '$RELEASE_TAG'."
81+
echo "Successfully created release with tag '$RELEASE_TAG'."

0 commit comments

Comments
 (0)