|
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,28 @@ 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: Install GitVersion |
| 58 | + uses: gittools/actions/gitversion/setup@v3.0.0 |
| 59 | + with: |
| 60 | + versionSpec: "6.x" |
| 61 | + |
| 62 | + - name: Determine Version |
| 63 | + id: gitversion |
| 64 | + uses: gittools/actions/gitversion/execute@v3.0.0 |
| 65 | + |
| 66 | + - name: Create and Push git tag |
| 67 | + run: | |
| 68 | + git tag v${{ steps.gitversion.outputs.GITVERSION_MajorMinorPatch }}" |
| 69 | + git push origin v${{ steps.gitversion.outputs.GITVERSION_MajorMinorPatch }}" |
62 | 70 |
|
63 | 71 | - name: Create GitHub Release
|
64 | 72 | id: create_release
|
65 | 73 | uses: actions/create-release@v1
|
66 | 74 | env:
|
67 | 75 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
68 | 76 | with:
|
69 |
| - tag_name: ${{ github.sha }} |
70 |
| - release_name: "Release ${{ github.sha }}" |
| 77 | + tag_name: v${{ steps.gitversion.outputs.GITVERSION_MajorMinorPatch }} |
| 78 | + release_name: "Release v${{ steps.gitversion.outputs.GITVERSION_MajorMinorPatch }}" |
71 | 79 | draft: false
|
72 | 80 | prerelease: false
|
73 | 81 |
|
|
77 | 85 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
78 | 86 | with:
|
79 | 87 | upload_url: ${{ steps.create_release.outputs.upload_url }}
|
80 |
| - asset_path: $env:Rar_File |
81 |
| - asset_name: CodeGenerator-${{ github.sha }}.rar |
| 88 | + asset_path: ${{ github.workspace }}\CodeGenerator.rar |
| 89 | + asset_name: CodeGenerator.rar |
82 | 90 | asset_content_type: application/octet-stream
|
0 commit comments