-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (39 loc) · 1.28 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8'
dotnet-quality: 'preview' # Change to 'ga' once .NET 8 release
- name: Clone repository
uses: actions/checkout@v4
- name: Restore dependencies
run: dotnet restore src/PurdueIo.sln
- name: Build
run: dotnet build --no-restore src/PurdueIo.sln
- name: Test
run: dotnet test --no-build --verbosity normal src/PurdueIo.sln
- name: Publish API
run: dotnet publish -c Release -r linux-x64 --self-contained=true -p:PublishReadyToRun=true -o publish/Api src/Api/Api.csproj
- name: Publish CatalogSync
run: dotnet publish -c Release -r linux-x64 --self-contained=true -p:PublishReadyToRun=true -o publish/CatalogSync src/CatalogSync/CatalogSync.csproj
- name: Upload API Artifact
uses: actions/upload-artifact@v4
with:
name: Api
path: publish/Api
if-no-files-found: error
- name: Upload CatalogSync Artifact
uses: actions/upload-artifact@v4
with:
name: CatalogSync
path: publish/CatalogSync
if-no-files-found: error