diff --git a/.github/workflows/dotnet-ci.yml b/.github/workflows/dotnet-ci.yml index d8554bbb..ffae70a8 100644 --- a/.github/workflows/dotnet-ci.yml +++ b/.github/workflows/dotnet-ci.yml @@ -108,24 +108,3 @@ jobs: working-directory: samples env: PYTHON_VERSION: ${{ steps.installpython.outputs.python-version }} - - test-reporting: - permissions: - contents: read - actions: read - checks: write - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - merge-multiple: true - - - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: ".NET Tests" - path: "*.trx" - reporter: dotnet-trx diff --git a/.github/workflows/dotnet-publish-ci.yml b/.github/workflows/dotnet-publish-ci.yml index 8e5c8797..74269169 100644 --- a/.github/workflows/dotnet-publish-ci.yml +++ b/.github/workflows/dotnet-publish-ci.yml @@ -1,7 +1,7 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET Publish (GitHub Packages) +name: .NET Publish (CI) on: pull_request: @@ -15,11 +15,6 @@ env: jobs: publish-github-packages: runs-on: ubuntu-latest - permissions: - contents: read - packages: write - attestations: write - id-token: write steps: - uses: actions/checkout@v4 @@ -49,6 +44,3 @@ jobs: with: name: nuget-packages path: ./nuget - - - name: Publish to GitHub packages - run: dotnet nuget push ./nuget/*.nupkg --source "https://nuget.pkg.github.com/tonybaloney/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dotnet-publish-gh-packages.yml b/.github/workflows/dotnet-publish-gh-packages.yml new file mode 100644 index 00000000..a4e4af3a --- /dev/null +++ b/.github/workflows/dotnet-publish-gh-packages.yml @@ -0,0 +1,19 @@ +name: "Publish NuGet packages to GitHub Packages" +on: + workflow_run: + workflows: [".NET Publish (CI)"] + types: + - completed +jobs: + report: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: nuget-packages + run-id: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/dotnet-publish-main.yml b/.github/workflows/dotnet-publish-main.yml index 356328a0..298c8098 100644 --- a/.github/workflows/dotnet-publish-main.yml +++ b/.github/workflows/dotnet-publish-main.yml @@ -1,7 +1,7 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET Publish (NuGet) +name: .NET Publish (main) on: push: diff --git a/.github/workflows/test-reporting.yml b/.github/workflows/test-reporting.yml new file mode 100644 index 00000000..5026c9f2 --- /dev/null +++ b/.github/workflows/test-reporting.yml @@ -0,0 +1,17 @@ +name: "Test Report" +on: + workflow_run: + workflows: [".NET CI"] + types: + - completed +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: phoenix-actions/test-reporting@v15 + id: test-report + with: + path: "*.trx" + reporter: dotnet-trx + artifact: /test-results-(.*)/ + name: ".NET Test report $1"