Skip to content

Commit

Permalink
Fix uploads, part 4 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
turikhay authored Mar 23, 2024
1 parent d906882 commit 238c603
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ on:
type: string
spigot-target:
type: string
hangar-upload:
type: boolean
modrinth-upload:
type: boolean
task:
type: string
default: build
outputs:
artifact:
description: Path to the jar artifact
Expand Down Expand Up @@ -51,14 +50,12 @@ jobs:
- name: Run the build
run: |
./gradlew \
build \
${{ inputs.task }} \
-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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hangar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.version.outputs.version }}
hangar-upload: true
task: publishPluginPublicationToHangar
secrets:
hangar-token: ${{ secrets.HANGAR_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/modrinth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: ./.github/workflows/build.yml
with:
version: ${{ needs.version.outputs.version }}
modrinth-upload: true
task: modrinth
secrets:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
10 changes: 1 addition & 9 deletions packages/single/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
implementation(project(":velocity"))
}

val dedupShadowJar by tasks.named("dedupShadowJar")
val dedupShadowJar = tasks.named("dedupShadowJar")
val semVer = SemVer.parse(project.version as String)
val isRelease = semVer.preRelease == null
val updatePages = isRelease || System.getenv("UPDATE_PAGES") == "true"
Expand Down Expand Up @@ -125,12 +125,4 @@ tasks {
getByName("syncAllPluginPublicationPagesToHangar")
)
}
assemble {
if (System.getenv("MODRINTH_UPLOAD") == "true") {
dependsOn("modrinth")
}
if (System.getenv("HANGAR_UPLOAD") == "true") {
dependsOn("publishPluginPublicationToHangar")
}
}
}

0 comments on commit 238c603

Please sign in to comment.