From 499c2e385be72c25a42cd13b65fadbf6759316d8 Mon Sep 17 00:00:00 2001 From: Jack Bond-Preston Date: Wed, 25 Jun 2025 11:02:38 +0100 Subject: [PATCH] ci: use new woodpecker YAML schema --- .woodpecker.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 94996b2..cc45734 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,13 +1,8 @@ -clone: - git: - image: woodpeckerci/plugin-git:latest - settings: - path: MagicStorageVoidBag - when: - event: tag +when: + - event: [push, tag, manual] -pipeline: - fetch-deps: +steps: + - name: fetch-deps image: jackbondpreston/msvb-build-env commands: - steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit" @@ -20,19 +15,18 @@ pipeline: " > tModLoader.targets - | - wget https://github.com/steviegt6/tml-patcher/releases/latest/download/TML.Patcher.zip - unzip -q TML.Patcher.zip -d TMLPatcher + wget https://github.com/steviegt6/fnb/archive/refs/tags/0.1.0.zip + unzip -q 0.1.0.zip -d TMLPatcher + dotnet build --configuration=Release TMLPatcher/fnb-0.1.0/src/ - | - rm -f /root/.steam/SteamApps/workshop/content/1281930/2563309347/workshop.json + sudo rm -f /root/.steam/SteamApps/workshop/content/1281930/2563309347/workshop.json YEAR=$(ls /root/.steam/SteamApps/workshop/content/1281930/2563309347 | cut -c -4 | sort -nr | head -n 1) VER=$(find /root/.steam/SteamApps/workshop/content/1281930/2563309347/ -type d -name "$YEAR.*" -printf "%f\n" | cut -c 6- | sort -nr | head -n 1) cp /root/.steam/SteamApps/workshop/content/1281930/2563309347/$YEAR.$VER/MagicStorage.tmod ./ - - dotnet TMLPatcher/TML.Patcher.dll extract MagicStorage.tmod + - dotnet TMLPatcher/fnb-0.1.0/src/Tomat.FNB/bin/Release/net8.0/fnb.dll tmod extract MagicStorage.tmod - cp MagicStorage/MagicStorage.dll $CI_WORKSPACE/ - when: - event: tag - build: + - name: build image: jackbondpreston/msvb-build-env commands: - | @@ -40,7 +34,6 @@ pipeline: echo "CI_WORKSPACE: $CI_WORKSPACE" - cat tModLoader.targets - cd $CI_WORKSPACE - - cd MagicStorageVoidBag - rm -rf .git - dotnet build -c Release || true - cp bin/Release/net6.0/MagicStorageVoidBag.dll . @@ -49,16 +42,13 @@ pipeline: - cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/ - cp MagicStorageVoidBag/MagicStorageVoidBag.dll release/ - ls release + + - name: gitea-release when: event: tag - - gitea-release: image: plugins/gitea-release settings: api_key: from_secret: gitea-api-key base_url: https://git.jackbondpreston.me files: release/* - when: - event: tag -