Skip to content

#27 - add FileSystemWatcher for config file #171

#27 - add FileSystemWatcher for config file

#27 - add FileSystemWatcher for config file #171

name: "01 - Build, Test, Publish"
on:
push:
# run on all commits
pull_request:
# run on all pull requests
workflow_dispatch:
# allows you to run this workflow manually from the Actions tab
jobs:
build_test_publish:
runs-on: windows-latest
defaults:
run:
shell: powershell
env:
BUILD_PATH: ./src
CONFIG_NAME: Release
# relative to BUILD_PATH
PUBLISH_PATH: ../.build/app
steps:
- uses: actions/checkout@v3
with:
# needed for gitversion to work
fetch-depth: 0
- name: setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: dotnet info
working-directory: ${{ env.BUILD_PATH }}
run: dotnet --info
- name: dotnet restore
working-directory: ${{ env.BUILD_PATH }}
run: dotnet restore
- name: dotnet build
working-directory: ${{ env.BUILD_PATH }}
run: dotnet build --configuration "${{ env.CONFIG_NAME }}" --no-restore
- name: dotnet test
working-directory: ${{ env.BUILD_PATH }}
run: dotnet test --configuration "${{ env.CONFIG_NAME }}" --no-build --filter "TestCategory!=Performance"
- name: dotnet publish
working-directory: ${{ env.BUILD_PATH }}
run: dotnet publish "./FancyMouse/FancyMouse.csproj" --configuration "${{ env.CONFIG_NAME }}" --no-build --output "${{ env.PUBLISH_PATH }}/net7.0-windows"
- name: zip release
working-directory: ${{ env.BUILD_PATH }}
run: |
"C:\Program Files\7-Zip\7z.exe" FancyMouse-preview-v0.0.1.zip app
- name: upload release
uses: actions/upload-artifact@v3
with:
name: app
path: .build/app
- name: dotnet tool jb inspectcode
working-directory: ${{ env.BUILD_PATH }}
run: |
dotnet new tool-manifest
dotnet tool install jetbrains.resharper.globaltools
dotnet tool run jb inspectcode "./FancyMouse.sln" -output="../.build/out/jb-inspectcode.xml" --no-build
#- name: upload jb-inspectcode.xml
# uses: actions/upload-artifact@v3
# with:
# name: jb-inspectcode.xml
# path: .build/out/jb-inspectcode.xml