mirror of
https://github.com/LavaGang/MelonLoader.git
synced 2026-10-12 02:06:39 +00:00
Automated Thunderstore Uploads
This commit is contained in:
@@ -21,4 +21,10 @@ jobs:
|
||||
|
||||
upload_nuget:
|
||||
name: NuGet
|
||||
uses: ./.github/workflows/upload_nuget.yml
|
||||
uses: ./.github/workflows/upload_nuget.yml
|
||||
|
||||
upload_thunderstore:
|
||||
name: Thunderstore
|
||||
uses: ./.github/workflows/upload_thunderstore.yml
|
||||
with:
|
||||
VERSION: ${{ inputs.VERSION }}
|
||||
@@ -0,0 +1,57 @@
|
||||
on:
|
||||
workflow_call:
|
||||
VERSION:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
upload_nuget:
|
||||
name: Upload NuGet Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.0.x
|
||||
|
||||
- name: Install Digitalroot.ModUploader
|
||||
run: |
|
||||
dotnet tool install -g Digitalroot.ModUploader
|
||||
|
||||
- name: Download Windows x64 Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: MelonLoader.Windows.x64.CI.Release
|
||||
path: ./compiled_release/windows_x64
|
||||
|
||||
- name: Copy Missing Files
|
||||
run: |
|
||||
cp icon.png compiled_release/windows_x64/icon.png
|
||||
cp compiled_release/windows_x64/MelonLoader/Documentation/README.md compiled_release/windows_x64/README.md
|
||||
|
||||
- name: Generate manifest.json
|
||||
run: |
|
||||
cat <<EOF > compiled_release/windows_x64/manifest.json
|
||||
{
|
||||
"name": MelonLoader,
|
||||
"version_number": "${{ inputs.VERSION }}",
|
||||
"website_url": "https://github.com/${{ github.repository }}",
|
||||
"description": "The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono",
|
||||
"dependencies": []
|
||||
}
|
||||
EOF
|
||||
|
||||
- name: Package Zip Archive
|
||||
run: |
|
||||
cd compiled_release/windows_x64
|
||||
zip -r ../${{ github.repository_owner }}-MelonLoader-${{ inputs.VERSION }}.zip ./
|
||||
|
||||
- name: Upload to Thunderstore
|
||||
run: |
|
||||
ModUploader \
|
||||
--file ${{ github.repository_owner }}-MelonLoader-${{ inputs.VERSION }}.zip \
|
||||
--token "${{ secrets.THUNDERSTORE_API_KEY }}" \
|
||||
--namespace "${{ github.repository_owner }}" \
|
||||
--community "${{ vars.THUNDERSTORE_COMMUNITY }}"
|
||||
Reference in New Issue
Block a user