-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.27 KB
/
build-dotnet.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
name: Build .NET 6
env:
DOTNET_VERSION: "6.0.x"
on:
push:
branches:
- "master"
jobs:
build:
name: "Build apps"
environment: "Production"
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build release
run: dotnet build --configuration Release
- name: Publish application (Windows)
run: dotnet publish -c Release -r win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
- name: Publish application (Linux)
run: dotnet publish -c Release -r linux-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true
- name: Archive windows
uses: actions/upload-artifact@v3
with:
name: docker-host-writer-windows-${{ github.sha }}-unsigned
path: bin/Release/net6.0/win-x64/publish/
if-no-files-found: error
- name: Archive linux
uses: actions/upload-artifact@v3
with:
name: docker-host-writer-linux-${{ github.sha }}
path: bin/Release/net6.0/linux-x64/publish/
if-no-files-found: error