Update dotnet-desktop.yml #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Build and Release | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build-and-release: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: List Installed Windows SDKs | |
run: dir 'C:\Program Files (x86)\Windows Kits\10\Lib' | |
- name: Restore dependencies | |
run: dotnet restore ./IniTranslator/IniTranslator.csproj -r win-x64 | |
- name: Publish | |
run: dotnet publish ./IniTranslator/IniTranslator.csproj -c Release -r win-x64 --no-restore -o publish -p:DebugType=None --self-contained true | |
- name: Compress Published Files | |
shell: powershell | |
run: Compress-Archive -Path publish\* -DestinationPath Release.zip | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release | |
path: Release.zip | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: Release.zip |