Skip to content

Infrastructure Genealogy module #91

Infrastructure Genealogy module

Infrastructure Genealogy module #91

Workflow file for this run

name: CI/CD
on:
push:
branches: [ "*" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: FamilyShow.sln
steps:
- name: Checkout
uses: actions/checkout@v4
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
# cache: true
# cache-dependency-path: '**/package-lock.json'
# Dotnet matcher
- name: Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: dotnet restore $env:Solution_Name
# Build the application
- name: Build the application
run: dotnet build $env:Solution_Name --configuration $env:Configuration --no-restore
env:
Configuration: ${{ matrix.configuration }}
# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test --configuration $env:Configuration --no-build --logger GitHubActions /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
env:
Configuration: ${{ matrix.configuration }}
# Archive the package
- name: Create archive
run: Compress-Archive -Path FamilyShow/bin/Release/* -DestinationPath FamilyShow/bin/Release/Family.Show-${{ github.ref_name }}.zip
if: startsWith(github.ref, 'refs/tags/')
# Release: https://github.com/softprops/action-gh-release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: FamilyShow/bin/Release/Family.Show-${{ github.ref_name }}.zip