Build: disable RestorePackagesWithLockFile that creates issues when c… #446
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 | |
permissions: | |
contents: read | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
steps: | |
# checkout code from repository | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
# install the latest .NET SDK on the local worker | |
- name: Install .NET SDK | |
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 | |
with: | |
dotnet-version: 9.0.x | |
cache: true | |
cache-dependency-path: '**/packages.lock.json' | |
# build the solution (Release) | |
- name: Build (Release) | |
run: dotnet build -c Release | |
# Pack the libraries and tools | |
- name: NuGet Pack | |
env: | |
DISABLE_NATIVE_PACKAGE: true | |
run: dotnet pack -c Release --output Redist | |
# Capture the build packages | |
- name: Upload artifacts | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: NuGet Packages | |
path: | | |
Redist/*.nupkg | |
Redist/*.snupkg | |
if-no-files-found: error | |
# In case of error, we want to capture any generated file for troubleshooting | |
- name: Capture generated source files | |
if: failure() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: Generated Source Files | |
path: '**/*.g.cs' |