Skip to content

Commit

Permalink
Merge pull request #50 from Johannestegner/feature/maven-deploy
Browse files Browse the repository at this point in the history
Maven central publishing.
  • Loading branch information
Johannestegner authored Dec 30, 2024
2 parents f4133b9 + c5c7b29 commit 49fc075
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
run: gradle build
- name: Set version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Publish to GitHub Packages
run: gradle publish
- name: Publish to GitHub Packages & Maven Central
run: gradle publish publishToMavenCentralPortal
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenToken: ${{ secrets.MAVEN_TOKEN }}
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
java: [ 8, 11, 17, 18 ]
java: [ 11, 17, 21, 23 ]
name: Java ${{ matrix.java }} test.
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'java'
id 'java-library'
id 'signing'
id 'tech.yanand.maven-central-publish' version '1.3.0'
}

group 'dev.organisationsnummer'
Expand Down Expand Up @@ -104,3 +105,10 @@ signing {
tasks.withType(Sign) {
onlyIf { version != "NONE" }
}

mavenCentral {
// Docs: https://github.com/yananhub/flying-gradle-plugin
authToken = findProperty("mavenToken")
publishingType = 'AUTOMATIC'
maxWait = 60
}

0 comments on commit 49fc075

Please sign in to comment.