Skip to content

Commit 8b3681c

Browse files
committed
Add project files.
1 parent 99dbb48 commit 8b3681c

File tree

10 files changed

+773
-0
lines changed

10 files changed

+773
-0
lines changed

.github/workflows/build.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags:
8+
- '*'
9+
10+
env:
11+
PROJECT_NAME: RoundUtils
12+
13+
MOD_HELPER_NAME: Btd6ModHelper
14+
BLOONSTD6: ./BloonsTD6
15+
16+
jobs:
17+
build:
18+
permissions:
19+
contents: write
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Clone Repo
24+
uses: actions/checkout@master
25+
with:
26+
path: ${{ env.PROJECT_NAME }}
27+
28+
29+
- name: Download Latest MelonLoader
30+
if: env.MELONLOADER_BRANCH == ''
31+
uses: robinraju/[email protected]
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
repository: LavaGang/MelonLoader
35+
fileName: MelonLoader.x64.zip
36+
tarBall: false
37+
zipBall: false
38+
latest: true
39+
- name: Extract Latest MelonLoader
40+
if: env.MELONLOADER_BRANCH == ''
41+
shell: bash
42+
run: unzip MelonLoader.x64.zip -d ${{ env.BLOONSTD6 }}
43+
44+
45+
- name: Download Specific MelonLoader
46+
if: env.MELONLOADER_BRANCH != ''
47+
uses: dawidd6/action-download-artifact@v6
48+
with:
49+
github_token: ${{ secrets.GITHUB_TOKEN }}
50+
workflow: build.yml
51+
branch: ${{ env.MELONLOADER_BRANCH }}
52+
name: MelonLoader.Linux.x64.CI.Release
53+
repo: LavaGang/MelonLoader
54+
path: ${{ env.BLOONSTD6 }}
55+
56+
57+
- name: Clone Dependencies Repo
58+
uses: actions/checkout@master
59+
with:
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
repository: doombubbles/btd6-ci-dependencies
62+
ref: main
63+
path: ${{ env.BLOONSTD6 }}/MelonLoader/Il2CppAssemblies
64+
65+
66+
- name: Download Latest Mod Helper
67+
uses: robinraju/[email protected]
68+
if: env.MOD_HELPER_BRANCH == ''
69+
with:
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
repository: gurrenm3/BTD-Mod-Helper
72+
fileName: ${{ env.MOD_HELPER_NAME }}.dll
73+
out-file-path: ${{ env.BLOONSTD6 }}/Mods/
74+
tarBall: false
75+
zipBall: false
76+
latest: true
77+
78+
79+
- name: Download Specific Mod Helper
80+
uses: dawidd6/action-download-artifact@v6
81+
if: env.MOD_HELPER_BRANCH != ''
82+
with:
83+
github_token: ${{ secrets.GITHUB_TOKEN }}
84+
workflow: build.yml
85+
name: ${{ env.MOD_HELPER_NAME }}.dll
86+
branch: ${{ env.MOD_HELPER_BRANCH }}
87+
repo: gurrenm3/BTD-Mod-Helper
88+
path: ${{ env.BLOONSTD6 }}/Mods/
89+
90+
91+
- name: Download btd6.targets
92+
shell: bash
93+
run: |
94+
if [ "$RUNNER_OS" == "Windows" ]; then
95+
choco install -y wget
96+
fi
97+
wget https://raw.githubusercontent.com/gurrenm3/BTD-Mod-Helper/master/BloonsTD6%20Mod%20Helper/btd6.targets
98+
99+
100+
- name: Setup .NET
101+
uses: actions/setup-dotnet@v4
102+
with:
103+
dotnet-version: 8.0.x
104+
105+
106+
- name: Build
107+
run: dotnet build -c Release -p:BloonsTD6="../${{ env.BLOONSTD6 }}" "${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj"
108+
109+
110+
- name: Upload Mod DLL
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: ${{ env.PROJECT_NAME }}.dll
114+
path: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll
115+
116+
117+
- name: Release
118+
uses: softprops/action-gh-release@v1
119+
if: startsWith(github.ref, 'refs/tags/')
120+
with:
121+
files: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll
122+
body_path: ${{ env.PROJECT_NAME }}/LATEST.md
123+
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)