CI updates #138
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: Build | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
- prerelease | |
paths-ignore: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
pull_request: | |
branches: | |
- dev | |
- main | |
- prerelease | |
paths-ignore: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v3.0.3 | |
with: | |
versionSpec: '6.x' | |
- name: Determine Version | |
id: version_step # step id used as reference for output values | |
uses: gittools/actions/gitversion/execute@v3.0.3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.* | |
- name: Clean dependencies | |
run: | | |
dotnet clean Mutagen.Bethesda.Serialization.sln -c Release | |
dotnet clean Mutagen.Bethesda.Serialization.Tests.sln -c Release | |
dotnet nuget locals all --clear | |
- name: Build Main Solution | |
run: dotnet build Mutagen.Bethesda.Serialization.sln -c Release -p:Version=${{ steps.version_step.outputs.fullSemVer }} | |
- name: Test Main Solution | |
run: dotnet test Mutagen.Bethesda.Serialization.sln -c Release --no-build -p:Version=${{ steps.version_step.outputs.fullSemVer }} | |
- name: Add results to local nuget cache | |
run: | | |
workingDir="$(cd "$(dirname "./")"; pwd)/$(basename "./")" | |
echo "workingDir=$workingDir" | |
dotnet nuget add source "${workingDir}/Mutagen.Bethesda.Serialization/bin/Release" --name CISerialization | |
dotnet nuget enable source CISerialization | |
dotnet nuget add source "${workingDir}/Mutagen.Bethesda.Serialization.Newtonsoft/bin/Release" --name CINewtonsoft | |
dotnet nuget enable source CINewtonsoft | |
dotnet nuget add source "${workingDir}/Mutagen.Bethesda.Serialization.SourceGenerator/bin/Release" --name CISourceGenerator | |
dotnet nuget enable source CISourceGenerator | |
dotnet nuget add source "${workingDir}/Mutagen.Bethesda.Serialization.Yaml/bin/Release" --name CIYaml | |
dotnet nuget enable source CIYaml | |
- name: Build Test Solution | |
run: dotnet build Mutagen.Bethesda.Serialization.Tests.sln -c Release /p:GeneratePackageOnBuild=false -p:Version=${{ steps.version_step.outputs.fullSemVer }} | |
- name: Test Test Solution | |
run: dotnet test Mutagen.Bethesda.Serialization.Tests.sln -c Release --no-build -p:Version=${{ steps.version_step.outputs.fullSemVer }} |