From 6600471eb547fc2d487afabc061d7b0ca56ebeb3 Mon Sep 17 00:00:00 2001 From: zml Date: Mon, 16 Aug 2021 19:56:04 -0700 Subject: [PATCH] build: Don't publish snapshots to GH packages --- .github/workflows/publish.yml | 2 -- .../org/spongepowered/configurate/build/PublishingPlugin.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f83e99247..c612c1aee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,8 +27,6 @@ jobs: - name: Publish with Gradle run: ./gradlew publish --stacktrace env: - GITHUB_USERNAME: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ORG_GRADLE_PROJECT_spongeSnapshotRepo: ${{ secrets.SPONGE_MAVEN_SNAPSHOT_REPO_URL }} ORG_GRADLE_PROJECT_spongeReleaseRepo: ${{ secrets.SPONGE_MAVEN_RELEASE_REPO_URL }} ORG_GRADLE_PROJECT_spongeUsername: ${{ secrets.SPONGE_MAVEN_REPO_USER }} diff --git a/buildSrc/src/main/kotlin/org/spongepowered/configurate/build/PublishingPlugin.kt b/buildSrc/src/main/kotlin/org/spongepowered/configurate/build/PublishingPlugin.kt index 93cb3ee36..506e782a6 100644 --- a/buildSrc/src/main/kotlin/org/spongepowered/configurate/build/PublishingPlugin.kt +++ b/buildSrc/src/main/kotlin/org/spongepowered/configurate/build/PublishingPlugin.kt @@ -90,7 +90,7 @@ class ConfiguratePublishingPlugin : Plugin { // Configure repositories val ghPackagesUser = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME") val ghPackagesPassword = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") - if (!isRelease && ghPackagesUser != null && ghPackagesPassword != null) { + if (isRelease && ghPackagesUser != null && ghPackagesPassword != null) { repositories.maven { repo -> repo.name = "GitHubPackages" repo.setUrl("https://maven.pkg.github.com/SpongePowered/Configurate")