forked from karashiiro/MachinaServer
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.44 KB
/
dotnet-release.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
name: .NET Release
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish MachinaWrapper\MachinaWrapper.csproj -c Release -f net6.0-windows --sc true -r win-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true
- name: Upload build artifact (executable)
uses: actions/[email protected]
with:
name: MachinaWrapper\MachinaWrapper.exe
path: bin\Release\net6.0-windows\win-x64\publish\MachinaWrapper.exe
- name: Upload build artifact (pdb)
uses: actions/[email protected]
with:
name: MachinaWrapper\MachinaWrapper.pdb
path: bin\Release\net6.0-windows\win-x64\publish\MachinaWrapper.pdb
- name: Upload build artifacts to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin\Release\net6.0-windows\win-x64\publish\MachinaWrapper.exe
bin\Release\net6.0-windows\win-x64\publish\MachinaWrapper.pdb