Skip to content

updated test projects to Net8 #61

updated test projects to Net8

updated test projects to Net8 #61

Workflow file for this run

on:
push:
branches:
- master
tags:
- "*"
pull_request:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for gitversion, checks out all branches and tags
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.10.2
- name: Build solution
run: dotnet build --configuration Release src/MethodBoundaryAspect.Fody.sln
- name: Run tests - NetFramework
run: dotnet test src\MethodBoundaryAspect.Fody.UnitTests.NetFramework --configuration Release --no-build
- name: Run tests - NetCore
run: dotnet test src\MethodBoundaryAspect.Fody.UnitTests.NetCore --configuration Release --no-build
- name: Run tests - NetCore Runtime
run: dotnet test src\MethodBoundaryAspect.Fody.RuntimeTests.NetCore --configuration Release --no-build
- name: Create the nuget package
run: dotnet pack --configuration Release --no-build src\MethodBoundaryAspect\MethodBoundaryAspect.csproj -o Artifacts/Packages
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nupkg
path: 'Artifacts/Packages/**/*.nupkg'
- name: Publish to nuget.org
run: dotnet nuget push Artifacts/Packages/**/*.nupkg --api-key ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
if: startsWith(github.ref, 'refs/tags/v')
# - name: Publish to github packages
# run: dotnet nuget push Artifacts/Packages/**/*.nupkg -s https://nuget.pkg.github.com/vescon/index.json --skip-duplicate
# if: startsWith(github.ref, 'refs/tags/v')