Skip to content

Commit

Permalink
Add Github Actions Build Template
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 authored Nov 9, 2024
1 parent 5bd9b43 commit dbf8faf
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Upload .NET Project

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x' # Specify your .NET version here

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Publish
run: dotnet publish --configuration Release --output ./output

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dotnet-artifacts-${{ matrix.os }}
path: ./output

0 comments on commit dbf8faf

Please sign in to comment.