Is the tag created by Paul Hatch's semantic-version the same as a GitHub Release? #191713
Replies: 2 comments 3 replies
-
|
They're not the same thing. A Git tag is just a named pointer to a specific commit. A GitHub Release is built on top of a tag. It adds a release page in the UI, release notes, downloadable assets, and shows up in the "Releases" section of your repo. It's a GitHub-layer concept, not a git concept. Does it matter? Depends on what you need. For CI/CD purposes like triggering a workflow on tag push or injecting a version string into a build artifact, the tag alone is fine. If you want a proper Releases page with binaries and changelogs, you'd create a release from that tag separately. A common pattern that works well: - uses: paulhatch/semantic-version@v5.4.0
id: version
# ... your config
- uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
generate_release_notes: trueThat gives you the semantic tag AND a proper GitHub Release pointing to it. Without the second step, you'll have a tag but the Releases section of your repo stays empty. |
Beta Was this translation helpful? Give feedback.
-
1. Git Tag (Created by the Action):The
2. GitHub Release:A GitHub Release is a GitHub-specific feature that sits "on top" of a Git Tag.
How to create a Release from the Tag?If you want to automatically turn the tag created by this action into a full GitHub Release, you should use an additional step in your workflow (like - name: Determine Version
id: semver
uses: paulfhatch/semantic-version@v5.4.0
with:
tag_prefix: "v"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semver.outputs.version_tag }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Actions Runner
Discussion Details
I have started learning how to use Paul Hatch's semantic-version (I'm working with version 5.4.0). From what I've been able to gather, a GitHub Release is a specialized Git Tag. The GitHub Release is done in the github.com web interface. Late last week I got my first instance of a GitHub Tag created using paulhatch/semantic-version@v5.4.0. I see that it is categorized as a tag, not a release. Does that really matter, or should I just think of what paulhatch/semantic-version@v5.4.0 generates as a release that looks like a tag?
Beta Was this translation helpful? Give feedback.
All reactions