-
Notifications
You must be signed in to change notification settings - Fork 8
executable file
·75 lines (61 loc) · 2.03 KB
/
build.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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ published ]
env:
DotNetVersion: "8.0.401"
BuildParameters: "/v:Minimal /consoleLoggerParameters:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"
jobs:
build-windows-2022:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
with:
vs-version: '[17.0,18.0)'
- name: Build VS2022
run: msbuild /restore ${{ env.BuildParameters }} /p:VSVersion=2022 Rhino.VisualStudio.Windows\Rhino.VisualStudio.Windows.csproj /bl:artifacts/log/Build.Windows.2022.binlog
- name: Upload extensions
uses: actions/upload-artifact@v4
with:
name: extensions-windows
path: artifacts/Release/*.vsix
- name: Upload templates
uses: actions/upload-artifact@v4
with:
name: templates
path: artifacts/bin/Rhino.Templates/Release/*.nupkg
- name: Upload log files
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: log
path: artifacts/log/**/*
publish:
needs: [ build-windows-2022 ]
runs-on: ubuntu-latest
if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/'))
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Add extensions to release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
files: |
extensions-windows/*.vsix
templates/*.nupkg