mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-26 09:21:55 +01:00
94 lines
3.5 KiB
YAML
94 lines
3.5 KiB
YAML
name: 'Call: Platform Uploads'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
target_tag:
|
|
description: 'Version to upload'
|
|
required: true
|
|
type: string
|
|
upload_modrinth:
|
|
description: 'Upload to modrinth.com'
|
|
required: true
|
|
type: string
|
|
upload_dbo:
|
|
description: 'Upload to dev.bukkit.org'
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
MODRINTH_TOKEN:
|
|
required: true
|
|
DBO_UPLOAD_API_TOKEN:
|
|
required: true
|
|
|
|
jobs:
|
|
platform_uploads:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get release info
|
|
id: release-info
|
|
uses: cardinalby/git-get-release-action@1.2.4
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag: ${{ inputs.target_tag }}
|
|
|
|
- name: Download release artifact
|
|
id: release-artifact
|
|
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version: tags/${{ steps.release-info.outputs.tag_name }}
|
|
file: multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar
|
|
|
|
- name: Parse release type
|
|
id: parse-release-type
|
|
run: |
|
|
if [[ "${{ steps.release-info.outputs.prerelease }}" == "true" ]]; then
|
|
echo Setting release_type to Beta
|
|
echo "release_type=Beta" >> $GITHUB_OUTPUT
|
|
else
|
|
echo Setting release_type to Release
|
|
echo "release_type=Release" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: echo params
|
|
run: |
|
|
echo "upload_modrinth: ${{ inputs.upload_modrinth }}"
|
|
echo "upload_dbo: ${{ inputs.upload_dbo }}"
|
|
echo "release_type: ${{ steps.parse-release-type.outputs.release_type }}"
|
|
|
|
- name: Upload to Modrinth
|
|
if: inputs.upload_modrinth == 'true'
|
|
uses: benwoo1110/modrinth-upload-action@v1
|
|
with:
|
|
api_token: ${{ secrets.MODRINTH_TOKEN }}
|
|
project_id: 3wmN97b8
|
|
version_number: ${{ steps.release-info.outputs.tag_name }}
|
|
files: '["${{ github.workspace }}/multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar"]'
|
|
name: ${{ steps.release-info.outputs.tag_name }}
|
|
changelog: ${{ steps.release-artifact.outputs.body }}
|
|
game_versions: 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13
|
|
version_type: ${{ steps.parse-release-type.outputs.release_type }}
|
|
loaders: bukkit, spigot, paper
|
|
|
|
- name: Upload to DBO
|
|
if: inputs.upload_dbo == 'true'
|
|
uses: benwoo1110/dbo-upload-action@v1
|
|
with:
|
|
api_token: ${{ secrets.DBO_UPLOAD_API_TOKEN }}
|
|
project_id: 30765
|
|
changelog: ${{ steps.release-artifact.outputs.body }}
|
|
changelog_type: markdown
|
|
display_name: ${{ steps.release-info.outputs.tag_name }}
|
|
game_versions: 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
|
|
release_type: ${{ steps.parse-release-type.outputs.release_type }}
|
|
project_relations: >
|
|
[
|
|
{"slug": "multiverse-portals", "type": "optionalDependency"},
|
|
{"slug": "multiverse-netherportals", "type": "optionalDependency"},
|
|
{"slug": "multiverse-signportals", "type": "optionalDependency"},
|
|
{"slug": "multiverse-inventories", "type": "optionalDependency"}
|
|
]
|
|
file_path: ${{ github.workspace }}/multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar
|