forked from the-paid-actor/dcs-dtc
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (65 loc) · 2.34 KB
/
build.yaml
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
77
78
79
80
81
82
83
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
env:
DOTNET_INSTALL_DIR: '.\.dotnet'
steps:
- uses: actions/checkout@v3
- name: Cache dotnet
id: cache-dotnet
uses: actions/cache@v3
with:
path: ${{ env.DOTNET_INSTALL_DIR }}
key: ${{ runner.os }}-dotnet-7
restore-keys: ${{ runner.os }}-dotnet-7
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v4
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Restore Packages
run: dotnet restore dcs-dtc/DTC.csproj
- name: Disable Out of Process Building
run: .\DisableOutOfProcBuild.exe
working-directory: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild
- name: Build Solution
run: |
dotnet publish -c Release -p:PublishProfile=FolderProfile dcs-dtc\DTC.csproj -o build_output
- name: Zip the publish folder
run: Compress-Archive -Path build_output/* -DestinationPath dcs_dtc_476th.zip
- uses: actions/upload-artifact@v4
with:
name: dcs_dtc_476th
path: dcs_dtc_476th.zip
overwrite: true
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dcs_dtc_476th.zip
asset_name: dcs_dtc_476th.zip
tag: ${{ github.ref }}
overwrite: true
- name: Build the Installer
run: DevEnv installer/installer.vdproj /build Release
- uses: actions/upload-artifact@v4
with:
name: build-result
path: installer/Release/dtc-setup.msi
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: installer/Release/dtc-setup.msi
asset_name: dtc-setup-${{ github.ref_name }}.msi
tag: ${{ github.ref }}
overwrite: true