Action file
#
name: Build Project & Create Artifact
on: push
build-project:
name: Build Project
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build the project with release configuration
run: dotnet build --configuration Release --output publish
- name: Upload the artifact to GitHub Actions
uses: actions/upload-artifact@v3
with:
name: dotnet-release
path: publish/