Skip to content

Commit e535ffc

Browse files
authored
fix: use github.ref_name instead of github.ref for release names
This change fixes the issue where release titles were showing the full Git reference path (e.g., "Release refs/tags/v4.5.0") rather than just the tag name. - Changed `github.ref` to `github.ref_name` in the release name - Also updated the major version extraction to use `github.ref_name` The difference between these GitHub Actions context variables: - `github.ref`: Contains the full reference path (e.g., "refs/tags/v4.5.0") - `github.ref_name`: Contains just the name portion (e.g., "v4.5.0") This results in cleaner release titles like "Release v4.5.0" instead of "Release refs/tags/v4.5.0".
1 parent 7613b90 commit e535ffc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
uses: ncipollo/release-action@v1
2323
with:
2424
tag: ${{ github.ref }}
25-
name: Release ${{ github.ref }}
25+
name: Release ${{ github.ref_name }}
2626
body: ${{ steps.changelog.outputs.changelog }}
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828
- name: Update Major Version Tag
2929
run: |
30-
MAJOR_VERSION=$(echo "${{ github.ref }}" | grep -oE 'v[0-9]+')
30+
MAJOR_VERSION=$(echo "${{ github.ref_name }}" | grep -oE 'v[0-9]+')
3131
git tag -f $MAJOR_VERSION
3232
git push origin $MAJOR_VERSION --force
3333
env:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy