-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28117ea
Showing
12 changed files
with
628 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
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 }} |
Oops, something went wrong.