Skip to content

Instantly share code, notes, and snippets.

@goproslowyo
Forked from mttaggart/dotnet.yml
Created July 30, 2022 20:38
Show Gist options
  • Save goproslowyo/c988d9fcf3295b21ea9b01c50b465df9 to your computer and use it in GitHub Desktop.
Save goproslowyo/c988d9fcf3295b21ea9b01c50b465df9 to your computer and use it in GitHub Desktop.
.NET Actions Build
# This is a template GitHub Action YAML file for building .NET projects.
# Handy for forking .NET assembly projects and building easily without VS.
# Make sure to replace "MyAssembly" with the name of the project!
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.*
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: MyAssembly.exe
path: D:\a\MyAssembly\MyAssembly\MyAssembly\bin\Release\MyAssembly.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment