Skip to content

Commit

Permalink
Update build to support .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Jan 22, 2025
1 parent 3ff936b commit ba25a90
Showing 1 changed file with 24 additions and 89 deletions.
113 changes: 24 additions & 89 deletions .github/workflows/BuildAndPack.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_BuildAndPack --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: BuildAndPack

on:
Expand All @@ -28,94 +12,45 @@ on:
- '*'

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
build-and-test:
strategy:
matrix:
include:
- os: windows
vm: windows-latest
- os: linux
vm: ubuntu-latest
- os: macos
vm: macos-13 # latest is arm64, and it breaks a bunch of stuff
env:
MSBuildEnableWorkloadResolver: false
name: ${{ matrix.os}}
runs-on: ${{ matrix.vm}}
steps:
- uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2.1.x
3.0.x
3.1.x
dotnet-version: |
9.0.x
8.0.x
6.0.x
8.0.401
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Test Pack PushToNuGet'
run: ./build.cmd Test Pack PushToNuGet
env:
GithubToken: ${{ secrets.GITHUB_TOKEN }}
NuGetToken: ${{ secrets.NUGET_TOKEN }}
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"
- uses: actions/upload-artifact@v4
with:
name: artifacts-linux
path: artifacts
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
2.1.x
3.0.x
3.1.x
6.0.x
8.0.401
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Test Pack PushToNuGet'
run: ./build.cmd Test Pack PushToNuGet
env:
GithubToken: ${{ secrets.GITHUB_TOKEN }}
NuGetToken: ${{ secrets.NUGET_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: artifacts-win
path: artifacts
macOS-latest:
name: macos-13 # latest is arm64, and it breaks a bunch of stuff
runs-on: macos-13 # latest is arm64, and it breaks a bunch of stuff
steps:
- uses: actions/checkout@v1
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
2.1.x
3.0.x
3.1.x
6.0.x
8.0.401
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}

- name: Run './build.cmd Test Pack PushToNuGet'
run: ./build.cmd Test Pack PushToNuGet
env:
GithubToken: ${{ secrets.GITHUB_TOKEN }}
NuGetToken: ${{ secrets.NUGET_TOKEN }}
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"

- uses: actions/upload-artifact@v4
with:
name: artifacts-macos
path: artifacts
name: packages-${{ matrix.os}}
path: artifacts/packages

0 comments on commit ba25a90

Please sign in to comment.