-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.61 KB
/
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
40
41
42
43
44
45
46
47
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
types: [opened, reopened, edited]
jobs:
build-publish-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore ./ShareClipbrd/ShareClipbrd.sln
- name: Build
run: dotnet build ./ShareClipbrd/ShareClipbrd.sln --no-restore
- name: Test
run: dotnet test ./ShareClipbrd/ShareClipbrd.sln --no-build --verbosity normal
- name: Publish
run: |
dotnet publish ./ShareClipbrd/ShareClipbrdApp/ShareClipbrdApp.csproj -c PublishRelease --no-self-contained --use-current-runtime -o ./out/win/TutoProxy.Server --os win -p:PublishProfile=FolderProfile -p:DebugType=None -p:DebugSymbols=false
dotnet publish ./ShareClipbrd/ShareClipbrdApp/ShareClipbrdApp.csproj -c PublishRelease --no-self-contained --use-current-runtime -o ./out/linux/TutoProxy.Server --os linux -p:PublishProfile=FolderProfile -p:DebugType=None
- name: Deploy Win
uses: actions/upload-artifact@v3
with:
name: win
path: ./out/win/ShareClipbrdApp/ShareClipbrdApp.exe
retention-days: 30
- name: Deploy Linux
uses: actions/upload-artifact@v3
with:
name: linux
path: ./out/linux/ShareClipbrdApp/ShareClipbrdApp
retention-days: 30