This commit is contained in:
52
.gitea/workflows/release.yaml
Normal file
52
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: "build-release"
|
||||||
|
run-name: "Build and Release MSVB"
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: arch-x86
|
||||||
|
container:
|
||||||
|
image: git.jackbondpreston.me/jack/msvb-build:latest
|
||||||
|
steps:
|
||||||
|
- name: Check out
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: MagicStorageVoidBag
|
||||||
|
- run: ls
|
||||||
|
- run: steamcmd "+login anonymous" "+workshop_download_item 1281930 2563309347" "+quit"
|
||||||
|
- run: wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
|
||||||
|
- run: unzip -q tModLoader.zip -d tModLoader
|
||||||
|
- run: rm tModLoader.zip
|
||||||
|
- run: ln -sf ${{ gitea.workspace }}/tModLoader/Libraries/Native/Linux/libSDL2-2.0.so.0 ${{ gitea.workspace }}/tModLoader/Libraries/Native/Linux/libSDL2.so
|
||||||
|
- run: >
|
||||||
|
echo "<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
|
||||||
|
<Import Project=\"${{ gitea.workspace }}/tModLoader/tMLMod.targets\" />
|
||||||
|
</Project>" > tModLoader.targets
|
||||||
|
- run: |
|
||||||
|
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/
|
||||||
|
- run: |
|
||||||
|
rm -f ~/.steam/SteamApps/workshop/content/1281930/2563309347/workshop.json
|
||||||
|
YEAR=$(ls ~/.steam/SteamApps/workshop/content/1281930/2563309347/ | cut -c -4 | sort -nr | head -n 1)
|
||||||
|
VER=$(find ~/.steam/SteamApps/workshop/content/1281930/2563309347/ -type d -name "$YEAR.*" -printf "%f\n" | cut -c 6- | sort -nr | head -n 1)
|
||||||
|
cp ~/.steam/SteamApps/workshop/content/1281930/2563309347/$YEAR.$VER/MagicStorage.tmod ./
|
||||||
|
- run: dotnet TMLPatcher/fnb-0.1.0/src/Tomat.FNB/bin/Release/net8.0/fnb.dll tmod extract MagicStorage.tmod
|
||||||
|
- run: cp MagicStorage/MagicStorage.dll ${{ gitea.workspace }}
|
||||||
|
- run: rm -rf MagicStorageVoidBag/.git
|
||||||
|
- run: dotnet build -c Release MagicStorageVoidBag/MagicStorageVoidBag.sln || true
|
||||||
|
- run: cp MagicStorageVoidBag/bin/Release/net8.0/MagicStorageVoidBag.dll .
|
||||||
|
- run: mkdir release
|
||||||
|
- run: cp ~/.local/share/Terraria/tModLoader/Mods/MagicStorageVoidBag.tmod release/
|
||||||
|
- run: cp MagicStorageVoidBag.dll release/
|
||||||
|
- run: ls release
|
||||||
|
- name: Add Gitea Release
|
||||||
|
id: gitea-release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
release/**
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
Reference in New Issue
Block a user