-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (34 loc) · 1.1 KB
/
build-test-webapi.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, test and run project
on:
pull_request:
branches:
- 'main'
types:
- opened
- synchronize
jobs:
build-and-test-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
working-directory: ./blotztask-api
- name: .Net - Tool restore
working-directory: ./blotztask-api
run: |
dotnet tool restore
- name: Build the project
run: dotnet build --configuration Release --no-restore
working-directory: ./blotztask-api
- name: Publish the project
run: dotnet publish -c Release -o ${{ runner.temp }}/blotztask-api
working-directory: ./blotztask-api
- name: Generate EF Core migration script
working-directory: ./blotztask-api
run: dotnet ef migrations script -o ${{ runner.temp }}/migrations.sql