Auto-create the release

This commit is contained in:
Alexander Shabarshov 2026-05-16 21:48:33 +01:00
parent 48c8b2a5f7
commit 2ba3a0cd3f

View File

@ -25,15 +25,28 @@ jobs:
id: version
uses: battila7/get-version-action@v2
- name: Build Release
run: dotnet build -c Release --no-restore /p:Version=${{ steps.version.outputs.version-without-v }} /p:BuildNumber=${{ github.run_number }} /p:SourceRevisionId=${{ github.sha }}
- name: Publish Release
run: dotnet publish -c Release -r win-x64 --self-contained true --no-build /p:Version=${{ steps.version.outputs.version-without-v }} /p:BuildNumber=${{ github.run_number }} /p:SourceRevisionId=${{ github.sha }}
run: dotnet publish -c Release -r win-x64 --self-contained true /p:Version=${{ steps.version.outputs.version-without-v }} /p:BuildNumber=${{ github.run_number }} /p:SourceRevisionId=${{ github.sha }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
- name: Create ZIP
shell: pwsh
run: |
$publish = "splitter-cli/bin/Release/net10.0/win-x64/publish"
$version = "${{ steps.version.outputs.version-without-v }}"
$zip = "splitter-win-x64-$version.zip"
if (Test-Path $zip) { Remove-Item $zip }
Compress-Archive -Path "$publish/*" -DestinationPath $zip
Write-Host "Created $zip"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: splitter-win-x64-${{ steps.version.outputs.version-without-v }}
path: splitter-cli/bin/Release/net10.0/win-x64/publish/**
tag_name: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
files: splitter-win-x64-${{ steps.version.outputs.version-without-v }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}