|
19 | 19 | Solution_Name: CodeGenerator.sln
|
20 | 20 | Wpf_Project_Path: CodeGenerator\CodeGenerator.csproj
|
21 | 21 | Output_Dir: ${{ github.workspace }}\publish
|
22 |
| - Rar_File: ${{ github.workspace }}\CodeGenerator-${{ github.sha }}.rar |
| 22 | + Rar_File: ${{ github.workspace }}\CodeGenerator.rar |
23 | 23 |
|
24 | 24 | steps:
|
25 | 25 | - name: Checkout
|
@@ -54,20 +54,30 @@ jobs:
|
54 | 54 | env:
|
55 | 55 | Configuration: ${{ matrix.configuration }}
|
56 | 56 |
|
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 |
62 | 72 |
|
63 | 73 | - name: Create GitHub Release
|
64 | 74 | id: create_release
|
65 | 75 | uses: actions/create-release@v1
|
66 | 76 | env:
|
67 | 77 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
68 | 78 | with:
|
69 |
| - tag_name: ${{ github.sha }} |
70 |
| - release_name: "Release ${{ github.sha }}" |
| 79 | + tag_name: $GITVERSION_MajorMinorPatch |
| 80 | + release_name: "Release ${{ GITVERSION_MajorMinorPatch }}" |
71 | 81 | draft: false
|
72 | 82 | prerelease: false
|
73 | 83 |
|
|
78 | 88 | with:
|
79 | 89 | upload_url: ${{ steps.create_release.outputs.upload_url }}
|
80 | 90 | asset_path: $env:Rar_File
|
81 |
| - asset_name: CodeGenerator-${{ github.sha }}.rar |
| 91 | + asset_name: CodeGenerator.rar |
82 | 92 | asset_content_type: application/octet-stream
|
0 commit comments