-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (57 loc) · 2.55 KB
/
dotnet-grasshopper.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
name: Grasshopper Plugin
on:
push:
branches: [ main, develop, master ]
pull_request:
branches: [ main, develop, master ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: .\plugin\groundhog.sln # Replace with your solution name, i.e. MyWpfApp.sln.
Plugin_File_Name: groundhog
Debug_File_Path: '.\plugin\bin\'
Release_File_Path: '.\plugin\release\'
# Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
# Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.
# Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# Add NuGet to the PATH: https://github.com/marketplace/actions/setup-nuget-exe-for-use-with-actions
- name: Setup NuGet
uses: NuGet/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# Restore NuGet packages
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
# Build the application
- name: Build the application
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
# # DEBUG
# - name: "Check output (debug)"
# if: ${{ matrix.configuration == 'Debug' }} # Only upload gha from a release build
# run: dir ${{ env.Debug_File_Path }}
# shell: cmd
- name: Upload release build of plugin as artefact
if: ${{ matrix.configuration == 'Release' }} # Only upload gha from a release build
uses: actions/upload-artifact@v2
with:
name: ${{ env.Plugin_File_Name }}
path: ${{ env.Release_File_Path }}/${{ env.Plugin_File_Name }}.gha