-
Notifications
You must be signed in to change notification settings - Fork 120
105 lines (84 loc) · 2.92 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- '*'
env:
PROJECT_NAME: Btd6ModHelper
CSPROJ: "./BloonsTD6 Mod Helper/BloonsTD6 Mod Helper.csproj"
BLOONSTD6: ./BloonsTD6
jobs:
build:
runs-on: windows-latest
steps:
- name: Clone Repo
uses: actions/checkout@master
- name: Validate JSON
uses: walbo/validate-json@v1.1.0
with:
files: modders.json
- name: Download Latest MelonLoader
if: env.MELONLOADER_BRANCH == ''
uses: robinraju/release-downloader@v1.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: LavaGang/MelonLoader
fileName: MelonLoader.x64.zip
tarBall: false
zipBall: false
latest: true
- name: Extract Latest MelonLoader
if: env.MELONLOADER_BRANCH == ''
shell: bash
run: unzip MelonLoader.x64.zip -d ${{ env.BLOONSTD6 }}
- name: Download Specific MelonLoader
if: env.MELONLOADER_BRANCH != ''
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yml
branch: ${{ env.MELONLOADER_BRANCH }}
name: MelonLoader.Windows.x64.CI.Release
repo: LavaGang/MelonLoader
path: ${{ env.BLOONSTD6 }}
- name: Clone Dependencies Repo
uses: actions/checkout@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: doombubbles/btd6-ci-dependencies
ref: main
path: ${{ env.BLOONSTD6 }}/MelonLoader/Il2CppAssemblies
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x # net6 can still build older as well
- name: Build
run: dotnet build -c BTD6_Release "${{ env.CSPROJ }}" -p:BloonsTD6="../BloonsTD6"
- name: Upload Mod DLL
uses: actions/upload-artifact@v2.2.4
with:
# Artifact name
name: ${{ env.PROJECT_NAME }}.dll
# A file, directory or wildcard pattern that describes what to upload
path: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll
- name: Upload Mod Documentation
uses: actions/upload-artifact@v2.2.4
with:
# Artifact name
name: ${{ env.PROJECT_NAME }}.xml
# A file, directory or wildcard pattern that describes what to upload
path: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.xml
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll
${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.xml
body_path: ./BloonsTD6 Mod Helper/LATEST.md
fail_on_unmatched_files: true