generated from Bims-sh/BattleBitApi
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.08 KB
/
build.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
44
45
46
47
48
name: Build and Publish Artifacts
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
env:
DOTNET_VERSION: '6.0.x'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
if: matrix.os == 'ubuntu-latest'
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup .NET for Windows
if: matrix.os == 'windows-latest'
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
dotnet-install-dir: 'C:\Program Files\dotnet'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish Artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: BattleBitApi
path: ./BattleBitApi/bin/Release/net6.0/