40 lines
844 B
YAML
40 lines
844 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Restore, build and publish
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
|
|
- name: Restore
|
|
run: dotnet restore HuntingAppApi.csproj
|
|
|
|
- name: Build
|
|
run: dotnet build HuntingAppApi.csproj --configuration Release --no-restore
|
|
|
|
- name: Publish
|
|
run: dotnet publish HuntingAppApi.csproj --configuration Release --no-build --output ./artifacts/huntapi
|
|
|
|
- name: Upload published API
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: huntapi
|
|
path: ./artifacts/huntapi
|