-
Notifications
You must be signed in to change notification settings - Fork 82
76 lines (67 loc) · 2.15 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: .NET
on:
push:
branches: [ "master", "fix-*" ]
pull_request:
branches: [ "master" ]
jobs:
build:
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: pre-build.ps1
run: powershell -ExecutionPolicy Unrestricted ./pre-build.ps1
shell: pwsh
- name: build.ps1
run: powershell -ExecutionPolicy Unrestricted ./build.ps1
shell: pwsh
- name: setup-msbuild
uses: microsoft/[email protected]
- name: msbuild panacea
run: |
msbuild OpenKh.Research.Panacea\OpenKh.Research.Panacea.vcxproj /p:Configuration=Release /p:Platform=x64
xcopy "OpenKh.Research.Panacea\Release\*.dll" bin\
xcopy "OpenKh.Research.Panacea\Dependencies\*.dll" bin\
- name: create openkh-release
shell: bash
env:
RELEASE_TAG: "release2-${{github.run_number}}"
run: |
echo $RELEASE_TAG > bin/openkh-release
- name: bin → openkh
run: ren bin openkh
shell: pwsh
- name: zip
uses: TheDoctor0/[email protected]
with:
filename: openkh.zip
path: openkh
- name: "GitHub release latest"
if: ${{ github.ref_name == 'master' }}
uses: "marvinpinto/action-automatic-releases@latest"
continue-on-error: true # at non master branch this will always fail
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "OpenKh Latest Build"
files: |
openkh.zip
- name: "GitHub release numbered"
uses: "marvinpinto/action-automatic-releases@latest"
continue-on-error: true # at non master branch this will always fail
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "release2-${{github.run_number}}"
prerelease: true
title: "OpenKh Build ${{github.run_number}} (${{github.ref_name}})"
files: |
openkh.zip