Skip to content

Update for v46

Update for v46 #486

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
tags:
- '*'
paths:
- BloonsTD6 Mod Helper/**
- .github/workflows/build.yml
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 MelonLoader Release
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 MelonLoader
if: env.MELONLOADER_BRANCH == ''
shell: bash
run: unzip MelonLoader.x64.zip -d ${{ env.BLOONSTD6 }}
- name: Download MelonLoader Artifact
if: env.MELONLOADER_BRANCH != ''
uses: dawidd6/action-download-artifact@v6
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@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build -c BTD6_Release "${{ env.CSPROJ }}" -p:BloonsTD6="../BloonsTD6"
- name: Upload Mod DLL
uses: actions/upload-artifact@v3
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@v3
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