Update dependency xunit.v3.extensibility.core to 3.0.1 (#137) #133
This file contains hidden or 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: publish-package | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - 'test/**' | |
| env: | |
| PipelineEnvironment: true | |
| jobs: | |
| publish-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setting up build version | |
| run: | | |
| echo "BUILD_VERSION=4.0.${GITHUB_RUN_NUMBER}" >> "${GITHUB_ENV}" | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - run: dotnet restore | |
| name: Install dependencies | |
| - run: dotnet build --configuration Release --no-restore | |
| name: Build | |
| - name: Test | |
| id: test | |
| run: | | |
| dotnet test test/Serilog.Sinks.XUnit.Injectable.Tests.csproj --verbosity Normal | |
| - name: Pack | |
| run: dotnet pack --no-build --configuration Release --output . | |
| - name: Publish to nuGet | |
| run: dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET__TOKEN }} --skip-duplicate | |
| - name: Add GitHub NuGet Source | |
| run: | | |
| dotnet nuget add source https://nuget.pkg.github.com/soenneker/index.json \ | |
| --name "github" \ | |
| --username "any" \ | |
| --password "${{ secrets.GH__TOKEN }}" \ | |
| --store-password-in-clear-text | |
| - name: Publish to GitHub Packages | |
| run: | | |
| dotnet nuget push ./*.nupkg \ | |
| --source "github" \ | |
| --api-key "${{ secrets.GH__TOKEN }}" | |
| - name: Create GitHub Release | |
| run: | | |
| changelog=$(git log -20 --pretty=format:"- %s") | |
| tag_name="v${BUILD_VERSION}" | |
| jq -n --arg tag_name "$tag_name" --arg name "$tag_name" --arg body "$changelog" \ | |
| '{tag_name:$tag_name,name:$name,body:$body,draft:false,prerelease:false}' > payload.json | |
| curl -s -X POST \ | |
| -H "Authorization: Bearer ${{ secrets.GH__TOKEN }}" \ | |
| -H "Accept: application/vnd.github+json" \ | |
| https://api.github.com/repos/${{ github.repository }}/releases \ | |
| -d @payload.json |