Support Windows 11 v22631.3155 #37
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: Publish | |
on: | |
push: | |
branches: [ main ] | |
env: | |
DOTNET_VERSION: 8.0.x | |
BUILD_TARGET: .\src\VirtualDesktop.sln | |
jobs: | |
build: | |
name: .NET Build | |
runs-on: windows-latest | |
if: "startsWith(github.event.head_commit.message, 'Release v')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use .NET ${{ env.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Build | |
run: dotnet build ${{ env.BUILD_TARGET }} -c Release | |
- name: Pack | |
run: dotnet pack ${{ env.BUILD_TARGET }} -c Release --no-build | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: nuget-packages | |
path: "**/*.nupkg" | |
publish: | |
name: Publish to NuGet | |
runs-on: windows-latest | |
needs: build | |
if: "startsWith(github.event.head_commit.message, 'Release v')" | |
steps: | |
- name: Use NuGet | |
uses: NuGet/[email protected] | |
with: | |
nuget-version: latest | |
nuget-api-key: ${{ secrets.NUGET_API_KEY }} | |
- name: Fetch artifacts | |
uses: actions/[email protected] | |
with: | |
name: nuget-packages | |
- name: Publish | |
run: nuget push **\*.nupkg -Source https://api.nuget.org/v3/index.json |