Merge pull request #1 from bogzxo/development #12
This file contains 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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-dotnet-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-dotnet- | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build for Windows | |
run: dotnet publish --no-restore --configuration Release --self-contained true -p:PublishSingleFile=true | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Upload Windows artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-artifacts-windows | |
path: ./ # Modify the path as per your project's artifacts on Windows |