Skip to content

Publish mod in Thunderstore #6

Publish mod in Thunderstore

Publish mod in Thunderstore #6

Workflow file for this run

name: Publish mod in Thunderstore
on:
workflow_dispatch:
inputs:
version:
description: 'Mod Version (SemVer: https://semver.org)'
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore
- name: Update version
run: "sed -i \"s#<Version>0.0.0</Version>#<Version>${{ github.event.inputs.version }}</Version>#\" LethalPerformance/LethalPerformance.csproj"
- name: Update modpack version
run: sed -i "s#0.0.0#${{ github.event.inputs.version }}#" LethalPerformance/Publish/manifest.json
- name: Build
run: dotnet build LethalPerformance/LethalPerformance.csproj --configuration Release --no-restore
- name: Zip files
run: |
mkdir -p ./release/BepInEx/plugins/LethalPerformance
mv ./LethalPerformance/bin/Release/netstandard2.1/* ./release/BepInEx/plugins/LethalPerformance
mv ./release/BepInEx/plugins/LethalPerformance/icon.png ./release
mv ./release/BepInEx/plugins/LethalPerformance/manifest.json ./release
mv ./*.md ./release
cd ./release
zip -r modpack.zip * -x ./BepInEx/plugins/LethalPerformance/LethalPerformance.deps.json
- name: Upload to Thunderstore
uses: GreenTF/upload-thunderstore-package@v4.3
with:
token: ${{ secrets.THUNDERSTORE_TOKEN }}
community: lethal-company
namespace: DiFFoZ
name: LethalPerformance
description: Optimizes the game
version: ${{ github.event.inputs.version }}
file: ./release/modpack.zip
repo: thunderstore.io
website: https://github.com/DiFFoZ/LethalPerformance
deps: |
BepInEx-BepInExPack@5.4.2100
- name: Create release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: LethalPerformance release v${{ github.event.inputs.version }}