Skip to content

Bump xunit.runner.visualstudio from 2.4.3 to 2.5.1 #172

Bump xunit.runner.visualstudio from 2.4.3 to 2.5.1

Bump xunit.runner.visualstudio from 2.4.3 to 2.5.1 #172

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths-ignore:
- .circleci/config.yml
- .github/workflows/security-scanning-csharp.yml
- .github/workflows/skipped-build.yml
- .github/dependabot.yml
- '.vscode/**'
- appveyor.yml
- azure-pipelines.yml
- LICENSE
- README.md
pull_request:
branches:
- main
paths-ignore:
- .circleci/config.yml
- .github/workflows/security-scanning-csharp.yml
- .github/workflows/skipped-build.yml
- .github/dependabot.yml
- '.vscode/**'
- appveyor.yml
- azure-pipelines.yml
- LICENSE
- README.md
jobs:
build:
name: Build
runs-on: windows-2022
env:
CREATE_RELEASE: ${{ github.ref_name == 'main' && !contains(github.event.head_commit.message, '[skip-release]') && !contains(github.event.head_commit.message, 'dependabot[bot]') }}
IS_FEATURE_PULL_REQUEST: ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'features/') }}
CREATE_PRERELEASE: 'false'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install latest .NET SDK
run: .\build\dotnet-install.ps1
- name: Restore .NET tools
run: dotnet tool restore
- name: Build
run: |
dotnet cake build.cake --bootstrap
dotnet cake build.cake --pack
- name: Upload NuGet packages
uses: actions/upload-artifact@v3
with:
name: packages
path: .\artifacts\packages
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: tests-results
path: .\artifacts\test-results\trx\*.trx
if: ${{ always() }}
- name: Determine if we're skipping release on feature Pull Request
if: ${{ env.IS_FEATURE_PULL_REQUEST == 'true' }}
run: |
$headCommitMessage = git log ${{ github.event.pull_request.head.sha }} -n 1 --format=%B
Write-Host "HEAD commit message is: $headCommitMessage"
if ($headCommitMessage -notcontains '[skip-release]') {
"CREATE_PRERELEASE=true" >> $Env:GITHUB_ENV
}
- name: Create GitHub release on main branch
if: ${{ env.CREATE_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
New-Item empty-release-notes.txt -ItemType file
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} (Get-Item .\artifacts\packages\*) --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt
- name: Create GitHub prerelease on features branches
if: ${{ env.CREATE_PRERELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
New-Item empty-release-notes.txt -ItemType file
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} (Get-Item .\artifacts\packages\*) --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt --prerelease
- name: Push NuGet package on main branch
if: ${{ env.CREATE_RELEASE == 'true' }}
run: dotnet nuget push .\artifacts\packages\ --source https://www.myget.org/F/gabrielweyer/api/v2/package --api-key ${{ secrets.MYGET_NUGET_RELEASE }} --symbol-source https://www.myget.org/F/gabrielweyer/symbols/api/v2/package
- name: Push NuGet pre-release package on features branches
if: ${{ env.CREATE_PRERELEASE == 'true' }}
run: dotnet nuget push .\artifacts\packages\ --source https://www.myget.org/F/gabrielweyer-pre-release/api/v2/package --api-key ${{ secrets.MYGET_NUGET_PRERELEASE }} --symbol-source https://www.myget.org/F/gabrielweyer-pre-release/symbols/api/v2/package