Bump JunitXml.TestLogger from 4.0.254 to 4.1.0 #244
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
PACKAGE_VERSION: | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v4 | |
name: Install .NET 8 | |
with: | |
dotnet-version: '8.0.x' | |
dotnet-quality: 'ga' | |
- 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@v4 | |
with: | |
name: packages | |
path: .\artifacts\packages | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v4 | |
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 |