Skip to content

build(deps): bump System.Configuration.ConfigurationManager from 4.5.0 to 8.0.0 in /OSLC4Net_SDK #424

build(deps): bump System.Configuration.ConfigurationManager from 4.5.0 to 8.0.0 in /OSLC4Net_SDK

build(deps): bump System.Configuration.ConfigurationManager from 4.5.0 to 8.0.0 in /OSLC4Net_SDK #424

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI
on:
push:
branches: [ 'main', 'master' ]
pull_request:
branches: [ 'main', 'master' ]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
version: [ {setup: '6.x', target: "net6.0"}, {setup: '8.x', target: "net8.0"}, {setup: '9.x', target: "net9.0"}]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: OSLC4Net_SDK/
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
show-progress: false
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.version.setup }}
source-url: https://nuget.pkg.github.com/oslc/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Target ${{ matrix.version.target }} only
shell: pwsh
run: |
(Get-Content JsonProviderTests/OSLC4Net.Core.JsonProviderTests.csproj) |
ForEach-Object { $_ -replace '>net8.0<', '>${{ matrix.version.target }}<' } |
Set-Content JsonProviderTests/OSLC4Net.Core.JsonProviderTests.csproj
(Get-Content OSLC4Net.ChangeManagementTest/OSLC4Net.ChangeManagementTest.csproj) |
ForEach-Object { $_ -replace '>net8.0<', '>${{ matrix.version.target }}<' } |
Set-Content OSLC4Net.ChangeManagementTest/OSLC4Net.ChangeManagementTest.csproj
(Get-Content OSLC4Net.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj) |
ForEach-Object { $_ -replace '>net8.0<', '>${{ matrix.version.target }}<' } |
Set-Content OSLC4Net.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj
- name: Cache NuGet
# id: cache-nuget
uses: actions/cache@v4
# env:
# cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ matrix.version.target }}-${{ hashFiles('.github/workflows/main.yml', '**/Directory.Build.props', '**/packages.config', '**/packages.lock.json', '**/*.sln', '**/*.csproj') }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --filter TestCategory!=RunningOslcServerRequired --collect:"XPlat Code Coverage"
# - name: Set version suffix
# id: version
# run: echo "::set-output name=suffix::$(date +'-ts.%y%m%d%H%M')"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build and publish NuGet package
shell: pwsh
run: |
dotnet pack -c Release --version-suffix "ts.$(Get-Date -Format 'yyyyMMddHHmm')" -o ./nupkg_out
dotnet nuget push '.\nupkg_out\*.nupkg' --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --no-symbols
if: |
success() && github.ref == 'refs/heads/main'
&& matrix.version.target == 'net8.0' && matrix.os == 'windows-latest'