Skip to content

Commit

Permalink
✨ publish a single zip with signatures and MD5s that can be directly …
Browse files Browse the repository at this point in the history
…published on central.sonatype.com
  • Loading branch information
ryandens committed Dec 12, 2024
1 parent 0ce80c5 commit 47ff314
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew -Pversion=${{ inputs.version }} build publishToMavenLocal
run: ./gradlew -Pversion=${{ inputs.version }} build zipRelease
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSPHRASE }}
Expand All @@ -38,4 +38,4 @@ jobs:
automatic_release_tag: "${{ inputs.version }}"
prerelease: false
files: |
/home/runner/.m2/repository/io/github/pixee/java-security-toolkit/${{ inputs.version }}/*
build/distributions/java-security-toolkit.zip
17 changes: 17 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,23 @@ publishing {
}
}
}

repositories {
maven {
name = "build"
url = uri(layout.buildDirectory.dir("repos/releases"))
}
}
}


tasks.register<Zip>("zipRelease") {
dependsOn("publishAllPublicationsToBuildRepository")
from(layout.buildDirectory.dir("repos/releases")) {
exclude("**/maven-metadata.xml")
exclude("**/maven-metadata.xml*")
}
archiveFileName.set("java-security-toolkit.zip")
}

tasks.jacocoTestReport {
Expand Down

0 comments on commit 47ff314

Please sign in to comment.