fixed action #14
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
#dev_actions.yml | |
name: Compile and run tests | |
on: | |
push: | |
# this will cause the action to run on pushes to branches that start with the prefixes specified here | |
branches: [ develop, tests/*, features/*, docs/*, bugs/* ] | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
# we'll also run this when pull requests to develop are opened | |
branches: [ develop ] | |
jobs: | |
Build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Setup .NET SDK | |
- name: Setup .NET SDK 3.1 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '3.1.x' | |
# Setup .NET SDK 8.0 | |
- name: Setup .NET SDK 8.0 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
# Install GitVersion | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.5.0' | |
- name: Determine Version | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
configFilePath: GitVersion.yml | |
id: gitversion | |
- name: Display GitVersion outputs | |
run: | | |
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | |
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Setup NuGet | |
uses: NuGet/[email protected] | |
- name: Restore nuGet packages | |
run: nuget restore $env:Solution_Name | |
- name: Run MSBuild | |
id: run-msbuild | |
run: | | |
msbuild $env:Solution_Name /t:Clean,Build /p:platform="Any CPU" /p:Configuration=Release | |
- name: Run tests | |
id: run-tests | |
run: | | |
dotnet test |