Skip to content

Commit 5ebaf46

Browse files
committed
chore: add tagging in workflow file
1 parent 594e2af commit 5ebaf46

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/dotnet-desktop.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
Solution_Name: CodeGenerator.sln
2020
Wpf_Project_Path: CodeGenerator\CodeGenerator.csproj
2121
Output_Dir: ${{ github.workspace }}\publish
22-
Rar_File: ${{ github.workspace }}\CodeGenerator-${{ github.sha }}.rar
22+
Rar_File: ${{ github.workspace }}\CodeGenerator.rar
2323

2424
steps:
2525
- name: Checkout
@@ -54,20 +54,30 @@ jobs:
5454
env:
5555
Configuration: ${{ matrix.configuration }}
5656

57-
# - name: Upload the .rar file
58-
# uses: actions/upload-artifact@v4
59-
# with:
60-
# name: CodeGenerator-${{ github.sha }}.rar
61-
# path: $env:Rar_File
57+
# - name: GitTools
58+
# uses: GitTools/actions@v3.0.0
59+
60+
- name: Install GitVersion
61+
uses: gittools/actions/gitversion/setup@v3.0.0
62+
with:
63+
versionSpec: "6.x"
64+
65+
- name: Determine Version
66+
uses: gittools/actions/gitversion/execute@v3.0.0
67+
68+
- name: Create and Push git tag
69+
run: |
70+
git tag $GITVERSION_SEMVER
71+
git push origin $GITVERSION_MajorMinorPatch
6272
6373
- name: Create GitHub Release
6474
id: create_release
6575
uses: actions/create-release@v1
6676
env:
6777
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6878
with:
69-
tag_name: ${{ github.sha }}
70-
release_name: "Release ${{ github.sha }}"
79+
tag_name: $GITVERSION_MajorMinorPatch
80+
release_name: "Release ${{ GITVERSION_MajorMinorPatch }}"
7181
draft: false
7282
prerelease: false
7383

@@ -78,5 +88,5 @@ jobs:
7888
with:
7989
upload_url: ${{ steps.create_release.outputs.upload_url }}
8090
asset_path: $env:Rar_File
81-
asset_name: CodeGenerator-${{ github.sha }}.rar
91+
asset_name: CodeGenerator.rar
8292
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)