Skip to content

chore(deps): update xunit monorepo #183

chore(deps): update xunit monorepo

chore(deps): update xunit monorepo #183

Workflow file for this run

name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: git fetch --prune --unshallow
- name: Setup .NET Core 8
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@a41619580c25efb59dfc062e92990914141abcad # v0.10.2
with:
versionSpec: '5.11.1'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@a41619580c25efb59dfc062e92990914141abcad # v0.10.2
# - name: Setup SonarScanner
# run: dotnet tool install --tool-path artifacts dotnet-sonarscanner
# - name: SonarScanner begin
# run: artifacts/dotnet-sonarscanner begin /k:"Haproxy.AgentCheck" /o:"lucca" /d:sonar.login=${{ secrets.SONAR_TOKEN }} /d:sonar.host.url="https://sonarcloud.io/" /d:sonar.cs.opencover.reportsPaths="./coverage.opencover.xml"
- name: Test
run: dotnet test --no-restore --verbosity minimal /p:CollectCoverage=true /p:CoverletOutput=../ /p:CoverletOutputFormat=opencover --logger:"console;verbosity=detailed"
# - name: SonarScanner end
# run: artifacts/dotnet-sonarscanner end /d:sonar.login=${{ secrets.SONAR_TOKEN }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish win-x64
run: |
dotnet publish Haproxy.AgentCheck/Haproxy.AgentCheck.csproj -r win-x64 --self-contained /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -c Release /p:Version="${{ steps.gitversion.outputs.majorMinorPatch }}" -o artifact/win-x64
zip artifact/Haproxy.AgentCheck.win-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip -q -j artifact/win-x64/*
- name: Publish linux-x64
run: |
dotnet publish Haproxy.AgentCheck/Haproxy.AgentCheck.csproj -r linux-x64 --self-contained /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -c Release /p:Version="${{ steps.gitversion.outputs.majorMinorPatch }}" -o artifact/linux-x64
zip artifact/Haproxy.AgentCheck.linux-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip -q -j artifact/linux-x64/*
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
with:
name: 'Haproxy.AgentCheck.win10-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip'
path: 'artifact/Haproxy.AgentCheck.win-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip'
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
with:
name: 'Haproxy.AgentCheck.linux-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip'
path: 'artifact/Haproxy.AgentCheck.linux-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip'
- name: Create Release on tag
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload win-x64
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/Haproxy.AgentCheck.win-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip
asset_name: Haproxy.AgentCheck.win-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip
asset_content_type: application/zip
- name: Upload linux-x64
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/Haproxy.AgentCheck.linux-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip
asset_name: Haproxy.AgentCheck.linux-x64.${{ steps.gitversion.outputs.majorMinorPatch }}.zip
asset_content_type: application/zip