@@ -11,34 +11,21 @@ jobs:
1111 steps :
1212 - uses : actions/checkout@v3
1313
14- - name : Get latest version tag
15- id : get_version
14+ - name : Generate Release Name
15+ id : release_name
1616 run : |
17- # Fetch tags from the repository
18- git fetch --tags
19- # Get the latest tag, if exists, otherwise default to v0.0.0
20- latest_tag=$(git describe --tags --abbrev=0 || echo "v0.0.0")
21- echo "Latest tag: $latest_tag"
17+ # Get the current date in the desired format
18+ release_date=$(date +"%Y-%m-%d")
19+ release_name="⚡ Release $release_date"
20+ echo "Generated release name: $release_name"
2221
23- # Split the version into its components
24- major=$(echo $latest_tag | cut -d. -f1 | tr -d 'v')
25- minor=$(echo $latest_tag | cut -d. -f2)
26- patch=$(echo $latest_tag | cut -d. -f3)
27-
28- # Increment the patch version
29- patch=$((patch + 1))
30-
31- # Create the new version tag
32- new_version="v$major.$minor.$patch"
33- echo "New version: $new_version"
34-
35- # Set the new version as an output
36- echo "::set-output name=version::$new_version"
22+ # Set the release name as an output
23+ echo "::set-output name=name::$release_name"
3724
3825 - name : Create a Release
3926 uses : elgohr/Github-Release-Action@v5
4027 env :
4128 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4229 with :
43- title : ${{ steps.get_version .outputs.version }} 🎉
44- tag_name : ${{ steps.get_version .outputs.version }}
30+ title : ${{ steps.release_name .outputs.name }}
31+ tag_name : ${{ steps.release_name .outputs.name }}
0 commit comments