Skip to content

chore(deps): update xunit-dotnet monorepo #665

chore(deps): update xunit-dotnet monorepo

chore(deps): update xunit-dotnet monorepo #665

Workflow file for this run

name: ci
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
env:
NUGET_PACKAGES: '${{ github.workspace }}/.nuget/packages'
jobs:
build-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: NuGet Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
${{ env.NUGET_PACKAGES }}
.nuke/temp
key: ${{ runner.os }}-nuget-${{ hashFiles('**/global.json', '**/*.csproj', '**/*.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4
with:
dotnet-version: 6.x # Required for dotnet-validate
global-json-file: ./global.json # Required, otherwise only the versions above get installed
- name: Restore .NET Tools
run: |
dotnet tool restore
- name: Build, Test and Pack
run: |
dotnet nuke
- name: Upload Coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
directory: ${{ github.workspace }}/artifacts/coverage
files: "*.cobertura.xml"
- name: Upload Packages
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: packages
path: ${{ github.workspace }}/artifacts/packages
if-no-files-found: error
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: NPM Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: 'lts/iron'
- name: NuGet Cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
${{ env.NUGET_PACKAGES }}
.nuke/temp
key: ${{ runner.os }}-nuget-${{ hashFiles('**/global.json', '**/*.csproj', '**/*.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4
- name: Restore .NET Tools
run: |
dotnet tool restore
- name: Build Docs
run: |
dotnet nuke Docs
- name: Upload Docs
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: ${{ github.workspace }}/artifacts/docs
publish-packages:
runs-on: ubuntu-latest
needs: [build-packages]
# Only publish if build was triggered for a tag
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Download Packages
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: packages
path: ${{ github.workspace }}/artifacts/packages
- name: Setup .NET
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4
- name: Restore .NET Tools
run: |
dotnet tool restore
- name: Publish NuGet packages
run: |
dotnet nuke Publish \
--nuget-api-key $NUGET_API_KEY
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
publish-docs:
runs-on: ubuntu-latest
needs: [build-docs]
# Only publish if build was triggered for a tag
if: startsWith(github.ref, 'refs/tags/v')
permissions:
pages: write # to deploy to pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
id: deployment