Bump xunit from 2.9.1 to 2.9.2 in the nuget-deps group #565
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 and publish release | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/marketplace/actions/setup-net-core-sdk | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.x" | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test | |
- name: Run unit tests | |
run: dotnet test ./PlexCleanerTests/PlexCleanerTests.csproj | |
version: | |
name: Version | |
runs-on: ubuntu-latest | |
needs: test | |
outputs: | |
SemVer2: ${{ steps.nbgv.outputs.SemVer2 }} | |
AssemblyVersion: ${{ steps.nbgv.outputs.AssemblyVersion }} | |
AssemblyFileVersion: ${{ steps.nbgv.outputs.AssemblyFileVersion }} | |
AssemblyInformationalVersion: ${{ steps.nbgv.outputs.AssemblyInformationalVersion }} | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# https://github.com/marketplace/actions/nerdbank-gitversioning | |
- name: Run Nerdbank.GitVersioning tool | |
id: nbgv | |
uses: dotnet/nbgv@master | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: version | |
strategy: | |
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
# https://learn.microsoft.com/en-us/dotnet/core/rid-catalog | |
matrix: | |
include: | |
- runtime: win-x64 | |
- runtime: linux-x64 | |
- runtime: linux-musl-x64 | |
- runtime: linux-arm | |
- runtime: linux-arm64 | |
- runtime: osx-x64 | |
- runtime: osx-arm64 | |
steps: | |
# https://github.com/marketplace/actions/setup-net-core-sdk | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.x" | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish | |
- name: Build | |
run: >- | |
dotnet publish ./PlexCleaner/PlexCleaner.csproj | |
--runtime ${{ matrix.runtime }} | |
--self-contained false | |
--output ${{ runner.temp }}/publish/${{ matrix.runtime }} | |
--configuration ${{ endsWith(github.ref, 'refs/heads/main') && 'Release' || 'Debug' }} | |
-property:Version=${{ needs.version.outputs.AssemblyVersion }} | |
-property:FileVersion=${{ needs.version.outputs.AssemblyFileVersion }} | |
-property:AssemblyVersion=${{ needs.version.outputs.AssemblyVersion }} | |
-property:InformationalVersion=${{ needs.version.outputs.AssemblyInformationalVersion }} | |
-property:PackageVersion=${{ needs.version.outputs.SemVer2 }} | |
# https://github.com/marketplace/actions/upload-a-build-artifact | |
- name: Upload build artifacts | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: publish-${{ matrix.runtime }} | |
path: ${{ runner.temp }}/publish | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: [ build, version ] | |
if: ${{ github.event_name != 'pull_request' }} | |
steps: | |
# https://github.com/marketplace/actions/download-a-build-artifact | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: publish-* | |
merge-multiple: true | |
path: ${{ runner.temp }}/publish | |
- name: Zip build output | |
run: 7z a -t7z ${{ runner.temp }}/publish/PlexCleaner.7z ${{ runner.temp }}/publish/* | |
# https://github.com/marketplace/actions/gh-release | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
tag_name: ${{ needs.version.outputs.SemVer2 }} | |
prerelease: ${{ !endsWith(github.ref, 'refs/heads/main') }} | |
files: ${{ runner.temp }}/publish/PlexCleaner.7z |