Skip to content

Commit d376c62

Browse files
Fix version format: use semantic versioning without 'v' prefix
- Update version file from v1.0.0 to 1.0.0 - Modify workflow to add 'v' prefix only for git tags and release names - Maintain clean version numbers in version file for consistency
1 parent 3287039 commit d376c62

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
run: |
3838
VERSION=$(cat version | tr -d '\n')
3939
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "tag_version=v$VERSION" >> $GITHUB_OUTPUT
4041
echo "Creating release for version: $VERSION"
4142
4243
- name: Generate changelog
@@ -47,7 +48,7 @@ jobs:
4748
4849
# Create a comprehensive changelog based on recent commits and version
4950
case "$VERSION" in
50-
"v1.1.0")
51+
"1.1.0")
5152
CHANGELOG=$(cat << 'EOF'
5253
## 🚀 Raspberry Pi OLED System Info Display v1.1.0 - Enhanced Monitoring
5354
@@ -123,21 +124,21 @@ jobs:
123124
id: check-tag
124125
if: steps.check.outputs.changed == 'true'
125126
run: |
126-
VERSION="${{ steps.version.outputs.version }}"
127-
if git tag -l | grep -q "^$VERSION$"; then
127+
TAG_VERSION="${{ steps.version.outputs.tag_version }}"
128+
if git tag -l | grep -q "^$TAG_VERSION$"; then
128129
echo "exists=true" >> $GITHUB_OUTPUT
129-
echo "Tag $VERSION already exists"
130+
echo "Tag $TAG_VERSION already exists"
130131
else
131132
echo "exists=false" >> $GITHUB_OUTPUT
132-
echo "Tag $VERSION does not exist"
133+
echo "Tag $TAG_VERSION does not exist"
133134
fi
134135
135136
- name: Create GitHub Release
136137
if: steps.check.outputs.changed == 'true' && steps.check-tag.outputs.exists == 'false'
137138
uses: softprops/action-gh-release@v1
138139
with:
139-
tag_name: ${{ steps.version.outputs.version }}
140-
name: "Pi HAT INFO ${{ steps.version.outputs.version }}"
140+
tag_name: ${{ steps.version.outputs.tag_version }}
141+
name: "Pi HAT INFO ${{ steps.version.outputs.tag_version }}"
141142
body: ${{ steps.changelog.outputs.changelog }}
142143
draft: false
143144
prerelease: false

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.0
1+
1.0.0

0 commit comments

Comments
 (0)