Skip to content

Instantly share code, notes, and snippets.

@guibranco
Last active December 15, 2023 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guibranco/bb7952adc79b2a37ad4db489e394a2d0 to your computer and use it in GitHub Desktop.
Save guibranco/bb7952adc79b2a37ad4db489e394a2d0 to your computer and use it in GitHub Desktop.
Sample build & test GitHub Action file for .NET 8
name: Build
on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!main'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Build solution
run: dotnet build -c Debug
- name: Run tests
run: dotnet test -c Debug --no-build --no-restore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment