From 8a5f73ce6a9ba5d9b0876c112cf009fe5660da43 Mon Sep 17 00:00:00 2001 From: Artur Khusainov Date: Sat, 23 Mar 2024 13:01:33 +0300 Subject: [PATCH] Fix uploads, part 2 (#120) --- .github/workflows/build.yml | 9 +++++++++ .github/workflows/hangar.yml | 7 +++---- .github/workflows/modrinth.yml | 7 +++---- 3 files changed, 15 insertions(+), 8 deletions(-) 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 }}