diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b2fbc2..63981ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,10 @@ on: type: string spigot-target: type: string + hangar-upload: + type: boolean + modrinth-upload: + type: boolean outputs: artifact: description: Path to the jar artifact @@ -45,6 +49,11 @@ jobs: -Pversion=${{ inputs.version }} \ -Pspigot_version=${{ steps.target.outputs.spigot-version }} \ -PprotocolLib_version=4.2.1 + env: + HANGAR_UPLOAD: ${{ inputs.hangar-upload }} + HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }} + MODRINTH_UPLOAD: ${{ inputs.modrinth-upload }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - name: Force original path preservation (for upload-artifact@v3) run: touch .empty - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/hangar.yml b/.github/workflows/hangar.yml index 4744f47..86fe80c 100644 --- a/.github/workflows/hangar.yml +++ b/.github/workflows/hangar.yml @@ -2,10 +2,6 @@ name: Hangar release on: workflow_dispatch -env: - HANGAR_UPLOAD: true - HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }} - jobs: version: name: Detect version @@ -16,3 +12,6 @@ jobs: uses: ./.github/workflows/build.yml with: version: ${{ needs.version.outputs.version }} + hangar-upload: true + secrets: + HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }} diff --git a/.github/workflows/modrinth.yml b/.github/workflows/modrinth.yml index 7a011e6..4a20a64 100644 --- a/.github/workflows/modrinth.yml +++ b/.github/workflows/modrinth.yml @@ -2,10 +2,6 @@ name: Modrinth release on: workflow_dispatch -env: - MODRINTH_UPLOAD: true - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - jobs: version: name: Detect version @@ -16,3 +12,6 @@ jobs: uses: ./.github/workflows/build.yml with: version: ${{ needs.version.outputs.version }} + modrinth-upload: true + secrets: + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}