Skip to content

Commit

Permalink
Fix uploads, part 2 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
turikhay authored Mar 23, 2024
1 parent de75940 commit 8a5f73c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/hangar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Hangar release

on: workflow_dispatch

env:
HANGAR_UPLOAD: true
HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }}

jobs:
version:
name: Detect version
Expand All @@ -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 }}
7 changes: 3 additions & 4 deletions .github/workflows/modrinth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Modrinth release

on: workflow_dispatch

env:
MODRINTH_UPLOAD: true
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}

jobs:
version:
name: Detect version
Expand All @@ -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 }}

0 comments on commit 8a5f73c

Please sign in to comment.