Skip to content

Bump version again #151

Bump version again

Bump version again #151

Workflow file for this run

name: Build, Test and Publish
on:
push:
branches: [ main, ci-cd, feature/* ]
tags:
- '*'
pull_request:
branches: [ main, ci-cd ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-13 # macos-latest (macos-12) currently has issues with failing to run some AVX2 instructions.
- macos-latest
targetFramework:
- net8.0
platform:
- x64
# I'd like to add arm64 here, but GitHub runners don't support it. The native port of Zstandard does support it though.
# Modern Linux and OSX environments also don't support x86 backcompat; and we don't have runners for them either.
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: "Setup SDKs & Components"
uses: Nexus-Mods/NexusMods.Archives.Nx/.github/actions/setup-sdks-components@main
- name: Build Tests
run: dotnet build -c Release -f ${{ matrix.targetFramework }} ./NexusMods.Archives.Nx.Tests/NexusMods.Archives.Nx.Tests.csproj
- name: Run Tests
run: dotnet test -c Release -f ${{ matrix.targetFramework }} ./NexusMods.Archives.Nx.Tests/NexusMods.Archives.Nx.Tests.csproj --collect:"XPlat Code Coverage;Format=cobertura;" --results-directory "Coverage" --no-build
upload:
needs: build
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: "Setup SDKs & Components"
uses: Nexus-Mods/NexusMods.Archives.Nx/.github/actions/setup-sdks-components@main
- name: Build Library
run: dotnet build -c Release ./NexusMods.Archives.Nx/NexusMods.Archives.Nx.csproj
- name: "Install ReportGenerator"
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: "Download Coverage Artifacts"
uses: actions/download-artifact@v3
with:
path: artifacts
- name: "Merge Coverage Files"
run: |
dotnet tool install --global dotnet-coverage
dotnet-coverage merge ./artifacts/*.cobertura.xml --recursive --output ./Cobertura.xml --output-format xml
- name: "Upload Coverage & Packages"
uses: Nexus-Mods/NexusMods.Archives.Nx/.github/actions/upload-coverage-packages@main
with:
code-coverage-path: './Cobertura.xml'
changelog-path: './Changelog.md'
nupkg-glob: '*.nupkg'
snupkg-glob: '*.snupkg'
nuget-key: ${{ secrets.NUGET_KEY }}
changelog-template: 'CHANGELOG.hbs'
is-release: ${{ startsWith(github.ref, 'refs/tags/') }}
release-tag: ${{ github.ref_name }}