Skip to content

Commit

Permalink
Create dotnet build action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
somnisomni authored Nov 16, 2024
1 parent a9197c2 commit b1bda71
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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: [ "main" ]
pull_request:
branches: [ "main" ]

env:
ROOT_CSPROJ_PATH: trawler-csharp.csproj

jobs:
build-linux-x64:
name: \[Linux x64\] Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore --arch x64
- name: Build using 'DebugCI' configuration
run: dotnet build $ROOT_CSPROJ_PATH --configuration DebugCI --arch x64
- name: Test
run: dotnet test $ROOT_CSPROJ_PATH --no-build --verbosity normal --configuration DebugCI --arch x64
- name: Publish the binary
run: dotnet publish $ROOT_CSPROJ_PATH --no-build --configuration DebugCI --arch x64
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: Linux x64
path: bin/DebugCI/publish/

0 comments on commit b1bda71

Please sign in to comment.