From 91e1d5bb8d84541e8aea01aa9b14e0b45b19ad75 Mon Sep 17 00:00:00 2001 From: Eli Julian Date: Tue, 3 Nov 2026 12:23:01 +0200 Subject: [PATCH 1/2] Add Maven Central release workflow and bump to 3.1.0. --- .github/workflows/release.yml | 61 +++++++++++++++++++++++++++++++++++ README.md | 6 ++-- build.gradle | 2 +- pom.xml | 2 +- 4 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d300ff61 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +name: Publish to Maven Central + +on: + push: + tags: + - "*" + +permissions: + contents: read + +concurrency: + group: maven-central-publish + cancel-in-progress: false + +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + + - name: Require tag to match pom version + run: | + version=$(python3 - <<'PY' + import xml.etree.ElementTree as ET + root = ET.parse("pom.xml").getroot() + print(root.findtext("{http://maven.apache.org/POM/4.0.0}version") or "") + PY + ) + if [ -z "$version" ]; then + echo "::error::Could not read project version from pom.xml" + exit 1 + fi + if [ "$version" != "$GITHUB_REF_NAME" ]; then + echo "::error::Tag '$GITHUB_REF_NAME' does not match pom version '$version'." + exit 1 + fi + case "$version" in + *-SNAPSHOT) + echo "::error::Refusing to publish SNAPSHOT version '$version'." + exit 1 + ;; + esac + + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 21 + cache: maven + server-id: central + server-username: CENTRAL_USERNAME + server-password: CENTRAL_PASSWORD + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Publish + run: ./mvnw -B deploy + env: + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/README.md b/README.md index 2bea7193..e12967a1 100644 --- a/README.md +++ b/README.md @@ -24,19 +24,19 @@ Add the following to your `pom.xml` file: com.kosherjava zmanim - 3.0.0 + 3.1.0 ``` #### Gradle Add the following to your `build.gradle` file: ```groovy -implementation 'com.kosherjava:zmanim:3.0.0' +implementation 'com.kosherjava:zmanim:3.1.0' ``` Or if you have `build.gradle.kts` file: ```kotlin -implementation("com.kosherjava:zmanim:3.0.0") +implementation("com.kosherjava:zmanim:3.1.0") ``` diff --git a/build.gradle b/build.gradle index 802fc7ca..c7831997 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ dependencies { } group = 'com.kosherjava' -version = '3.0.1-SNAPSHOT' +version = '3.1.0' java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 diff --git a/pom.xml b/pom.xml index 01e0b9f9..21e46386 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.kosherjava zmanim - 3.0.1-SNAPSHOT + 3.1.0 KosherJava Zmanim The Zmanim library is an API for a specialized calendar that can calculate different astronomical times From 7d9858125582cae46130e82b1a81c9cd2d5ece20 Mon Sep 17 00:00:00 2001 From: Eli Julian Date: Tue, 3 Nov 2026 12:40:38 +0200 Subject: [PATCH 2/2] bump version --- build.gradle | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c7831997..11008e5e 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ dependencies { } group = 'com.kosherjava' -version = '3.1.0' +version = '3.1.1-SNAPSHOT' java { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 diff --git a/pom.xml b/pom.xml index 21e46386..4befcc8b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.kosherjava zmanim - 3.1.0 + 3.1.1-SNAPSHOT KosherJava Zmanim The Zmanim library is an API for a specialized calendar that can calculate different astronomical times