1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00
MpcNET/.github/workflows/build-and-test.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

2021-10-03 15:53:58 +00:00
name: Build and Test MpcNET
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
build:
runs-on: windows-latest
2021-10-03 15:53:58 +00:00
env:
Solution_Name: MpcNET
Configuration: Release
2021-10-03 15:53:58 +00:00
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
# Restore the application
- name: Restore the application
working-directory: ./Sources
run: |
msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
2021-10-03 19:16:52 +00:00
# Build package and upload to github packages
- name: Build package
working-directory: ./Sources
run: |
dotnet nuget add source --username Difegue --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Difegue/index.json"
dotnet build $env:Solution_Name --configuration $env:Configuration
2021-10-03 19:16:52 +00:00
dotnet pack --configuration $env:Configuration -o ./
dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
2021-10-03 15:53:58 +00:00
# Execute all unit tests in the solution
2021-10-03 19:16:52 +00:00
#- name: Execute unit tests
# working-directory: ./Sources
# run: dotnet test