Skip to content

build: Bump NuGet dependencies #123

build: Bump NuGet dependencies

build: Bump NuGet dependencies #123

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Disabled Release for now, not sure if it's needed or not still working out the release workflow
# repository_dispatch:
# types: [ release ]
permissions:
contents: read
packages: write
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
jobs:
prepare:
name: Prepare
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
# Setup
- name: Setup Job
id: setup-job
uses: ./.github/actions/setup-job
with:
dotnet_sdk_version: ${{ vars.DOTNET_SDK_VERSION }}
ignore_dotnet_on_cake_cache_hit: true
# Prepare
- name: '[Prepare]'
if: steps.setup-job.outputs.cake-cache-hit != 'true'
run: dotnet build build/CI.sln -c Release
package:
name: Package
needs: [prepare]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
# Setup
- name: Setup Job
uses: ./.github/actions/setup-job
with:
dotnet_sdk_version: ${{ vars.DOTNET_SDK_VERSION }}
# Package
- name: '[Package]'
run: dotnet run/build.dll --target=Package
# Upload Packages
- name: 'Upload Packages'
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: packages
path: ${{ github.workspace }}/artifacts/packages
test:
name: Test
needs: [prepare]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
targetFramework: [net6.0, net7.0, net8.0]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
# Setup
- name: Setup Job
uses: ./.github/actions/setup-job
with:
dotnet_sdk_version: ${{ vars.DOTNET_SDK_VERSION }}
# Test
- name: '[Test]'
run: dotnet run/build.dll --target=Test --target_framework=${{ matrix.targetFramework }}
# Report
- name: Test Summary
uses: test-summary/action@v2
if: matrix.targetFramework == 'net8.0'
with:
paths: artifacts/test-results/*.results.xml
publish:
name: Publish
needs: [package, test]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
# Setup
- name: Setup Job
uses: ./.github/actions/setup-job
with:
dotnet_sdk_version: ${{ vars.DOTNET_SDK_VERSION }}
# Download Packages
- uses: actions/download-artifact@v4
name: Download Packages
with:
name: packages
path: ${{ github.workspace }}/artifacts/packages
# Publish
- name: '[Publish]'
run: dotnet run/publish.dll --target=PublishNuGet