-
-
Notifications
You must be signed in to change notification settings - Fork 142
91 lines (75 loc) · 3.36 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Build SimpleTweaksPlugin
on:
push:
branches: 'main'
jobs:
build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: [windows-2022]
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 0
- name: Setup MSBuild
uses: microsoft/[email protected]
with:
vs-prerelease: true
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore NuGet Packages [Release]
if: "contains(github.event.head_commit.message, '[release]')"
id: restoreNugetAttempt1Release
continue-on-error: true
run: nuget restore SimpleTweaksPlugin.sln
- name: Restore NuGet Packages [Release] Attempt 2
if: steps.restoreNugetAttempt1Release.outcome == 'failure'
id: restoreNugetAttempt2Release
continue-on-error: true
run: nuget restore SimpleTweaksPlugin.sln
- name: Restore NuGet Packages [Release] Attempt 3
if: steps.restoreNugetAttempt2Release.outcome == 'failure'
id: restoreNugetAttempt3Release
run: nuget restore SimpleTweaksPlugin.sln
- name: Restore NuGet Packages [Debug]
if: "!contains(github.event.head_commit.message, '[release]')"
id: restoreNugetAttempt1Debug
continue-on-error: true
run: nuget restore dev/SimpleTweaksPlugin.Dev.sln
- name: Restore NuGet Packages [Debug] Attempt 2
if: steps.restoreNugetAttempt1Debug.outcome == 'failure'
id: restoreNugetAttempt2Debug
continue-on-error: true
run: nuget restore SimpleTweaksPlugin.sln
- name: Restore NuGet Packages [Debug] Attempt 3
if: steps.restoreNugetAttempt2Debug.outcome == 'failure'
id: restoreNugetAttempt3Debug
run: nuget restore SimpleTweaksPlugin.sln
# - name: Download Dalamud
# if: "!contains(github.event.head_commit.message, '[stg]')"
# run: |
# Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
# Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Download Dalamud staging
# if: "!contains(github.event.head_commit.message, '[stg]')"
run: |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Build [Release]
if: "contains(github.event.head_commit.message, '[release]')"
run: msbuild SimpleTweaksPlugin.sln /p:Configuration=Release
- name: Build [Debug]
if: "!contains(github.event.head_commit.message, '[release]')"
run: msbuild dev/SimpleTweaksPlugin.Dev.sln /p:Configuration=Debug
- name: Extract [Release]
if: "contains(github.event.head_commit.message, '[release]')"
run: |
Expand-Archive -Force ./bin/x64/Release/SimpleTweaksPlugin/latest.zip ./Artifact
- name: Extract [Debug]
if: "!contains(github.event.head_commit.message, '[release]')"
run: |
Expand-Archive -Force ./bin/x64/Debug/SimpleTweaksPlugin/latest.zip ./Artifact
- name: Upload Build Artifact
uses: actions/[email protected]
with:
path: ./Artifact/*