Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0261c5b

Browse files
committedAug 9, 2024··
chore: add tagging in workflow file
1 parent 594e2af commit 0261c5b

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed
 

‎.github/workflows/dotnet-desktop.yml

Lines changed: 20 additions & 9 deletions
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,31 @@ 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+
id: gitversion
67+
uses: gittools/actions/gitversion/execute@v3.0.0
68+
69+
- name: Create and Push git tag
70+
run: |
71+
git tag $GITVERSION_SEMVER
72+
git push origin $GITVERSION_MajorMinorPatch
6273
6374
- name: Create GitHub Release
6475
id: create_release
6576
uses: actions/create-release@v1
6677
env:
6778
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6879
with:
69-
tag_name: ${{ github.sha }}
70-
release_name: "Release ${{ github.sha }}"
80+
tag_name: $GITVERSION_MajorMinorPatch
81+
release_name: "Release ${{ steps.gitversion.outputs.GITVERSION_MajorMinorPatch }}"
7182
draft: false
7283
prerelease: false
7384

@@ -78,5 +89,5 @@ jobs:
7889
with:
7990
upload_url: ${{ steps.create_release.outputs.upload_url }}
8091
asset_path: $env:Rar_File
81-
asset_name: CodeGenerator-${{ github.sha }}.rar
92+
asset_name: CodeGenerator.rar
8293
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)
Please sign in to comment.