Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ Add the following to your `pom.xml` file:
<dependency>
<groupId>com.kosherjava</groupId>
<artifactId>zmanim</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</dependency>
```

#### 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")
```


Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
}

group = 'com.kosherjava'
version = '3.0.1-SNAPSHOT'
version = '3.1.1-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.kosherjava</groupId>
<artifactId>zmanim</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<name>KosherJava Zmanim</name>
<description>
The Zmanim library is an API for a specialized calendar that can calculate different astronomical times
Expand Down
Loading