Skip to content

Enabling extension of events (#4698) #32

Enabling extension of events (#4698)

Enabling extension of events (#4698) #32

name: NUnit.Myget.Publish
env:
MinVerAutoIncrement: minor
on:
push:
branches:
- main
- master
- release
- 'v3'
- myget
defaults:
run:
shell: pwsh
jobs:
build-windows:
name: Windows Build
runs-on: windows-latest
steps:
- name: ⤵️ Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: 🛠️ Install dotnet tools
run: dotnet tool restore
- name: 🔨 Build and Test
run: dotnet tool run dotnet-cake --target=Test --test-run-name=Windows --configuration=Release
- name: 🔨 Windows Specific Tests
run: dotnet test --no-build --configuration=Release src/NUnitFramework/windows-tests/windows-tests.csproj
- name: 📦 Package
run: dotnet tool run dotnet-cake --target=Package
- name: 💾 Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: package
- name: 💾 Upload test results
uses: actions/upload-artifact@v4
with:
name: Test results (Windows)
path: test-results
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Publish nupkg and snupkg to Myget.org
run: |
foreach($file in (Get-ChildItem package -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}
foreach($file in (Get-ChildItem "package" -Recurse -Include *.snupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}