Skip to content

Commit

Permalink
Version Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
zourzouvillys committed Oct 18, 2023
1 parent 02fb20e commit 12c1a2f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Release to Maven Central

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1.1.0
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish with Gradle
run: ./gradlew -PossrhUsername=${{ secrets.OSSRH_USERNAME }} -PossrhPassword=${{ secrets.OSSRH_TOKEN }} -Psigning.gnupg.keyName=E1DCAAA2 publish closeAndReleaseRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
27 changes: 25 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'eclipse'
id 'com.diffplug.eclipse.apt' version '3.40.0' apply false
id 'com.diffplug.eclipse.apt' version '3.40.0' apply false
id 'io.codearte.nexus-staging' version '0.30.0' apply false
}

def calculateReleaseUrl(version) {
Expand All @@ -18,7 +19,7 @@ def calculateReleaseUrl(version) {
allprojects { project ->

group = 'io.netlibs.ami'
version = '0.9.0-SNAPSHOT'
version = '0.10.0'

repositories {
mavenCentral()
Expand Down Expand Up @@ -51,3 +52,25 @@ wrapper {
}



/*
* Sonatype Staging Finalization
* ====================================================
*
* When publishing to Maven Central, we need to close the staging
* repository and release the artifacts after they have been
* validated. This configuration is for the root project because
* it operates at the "group" level.
*/

if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) {
apply plugin: "io.codearte.nexus-staging"
nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
packageGroup = "io.netlibs"
// stagingRepositoryId
stagingProfileId = "395cd0d126dacd"
username = project.property("ossrhUsername")
password = project.property("ossrhPassword")
}
}

0 comments on commit 12c1a2f

Please sign in to comment.