From 18ff0f7396160ce73a70d619004da36795be981d Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Thu, 25 Jun 2020 14:54:15 -0700 Subject: [PATCH] Fix snapshot publishing --- .github/workflows/snapshot.yml | 2 +- test-lab-plugin/build.gradle.kts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index c2b4d24..7151e78 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -6,7 +6,7 @@ on: - master jobs: - setup: + snapshot: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/test-lab-plugin/build.gradle.kts b/test-lab-plugin/build.gradle.kts index 53437e3..25c4547 100644 --- a/test-lab-plugin/build.gradle.kts +++ b/test-lab-plugin/build.gradle.kts @@ -147,8 +147,13 @@ publishing { publications { matching { it.name == "pluginMaven" }.withType { artifact(tasks.shadowJar.get()) - artifact(sourcesJar.get()) - artifact(javadocJar.get()) + + // GitHub Packages appears to be broken when uploading SNAPSHOT JARs with classifiers. + // https://github.community/t/github-package-registry-as-maven-repo-trouble-uploading-artifact/14226 + if (!isSnapshot) { + artifact(sourcesJar.get()) + artifact(javadocJar.get()) + } groupId = project.group.toString() artifactId = project.name