mirror of
https://github.com/unclshura/splitter.git
synced 2026-06-22 00:22:01 +00:00
Auto-create the release
This commit is contained in:
parent
48c8b2a5f7
commit
2ba3a0cd3f
29
.github/workflows/publish.yml
vendored
29
.github/workflows/publish.yml
vendored
@ -25,15 +25,28 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
uses: battila7/get-version-action@v2
|
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
|
- 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
|
- name: Create ZIP
|
||||||
uses: actions/upload-artifact@v4
|
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:
|
with:
|
||||||
name: splitter-win-x64-${{ steps.version.outputs.version-without-v }}
|
tag_name: ${{ github.ref_name }}
|
||||||
path: splitter-cli/bin/Release/net10.0/win-x64/publish/**
|
name: "Release ${{ github.ref_name }}"
|
||||||
|
files: splitter-win-x64-${{ steps.version.outputs.version-without-v }}.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user