This repository was archived by the owner on Sep 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (64 loc) · 2.43 KB
/
dev.yml
File metadata and controls
80 lines (64 loc) · 2.43 KB
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build CursedMod/dev
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
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:
REFERENCES: https://dependencies.cursedsl.com/dev.zip
SL_REFERENCES: ${{ github.workspace }}/References
PROJECT_FOLDER: CursedMod
Solution_Name: CursedMod.sln
Project_Path: CursedMod\CursedMod.csproj
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: Download Refs
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ env.REFERENCES }} -OutFile ${{ github.workspace }}/References.zip
Expand-Archive -Path References.zip -DestinationPath ${{ env.SL_REFERENCES }}
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.1.1
- name: Get nuget packages
run: nuget restore ${{ env.Solution_Name }}
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Build the app
run: msbuild $env:Project_Path /p:Configuration=$env:Configuration
env:
Project_Path: ${{ env.Project_Path }}
Configuration: ${{ matrix.configuration }}
# Upload the app
- name: Upload release results
uses: actions/upload-artifact@v3
with:
name: Release Build
path: ${{ env.PROJECT_FOLDER }}\bin\Release\CursedMod.dll
- name: Upload debug results
uses: actions/upload-artifact@v3
with:
name: Debug Build
path: ${{ env.PROJECT_FOLDER }}\bin\Debug\CursedMod.dll