Skip to content

Commit 4f4f233

Browse files
committed
feat: jitpack repo
1 parent 387d8f2 commit 4f4f233

3 files changed

Lines changed: 62 additions & 45 deletions

File tree

.github/workflows/release.yaml

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# 1. Another pipeline (e.g. pbinitiative/zenbpm) updates api.yaml in this
77
# repo and commits it to main.
88
# 2. That same pipeline pushes a matching version tag to this repo.
9-
# 3. This workflow fires, bumps pom.xml to match the tag, builds, and
10-
# deploys to the configured Maven repository.
9+
# 3. This workflow fires, stamps the version, builds, runs tests, and
10+
# creates a GitHub Release.
1111
#
12-
# Requirements (set up in GitHub repo Settings → Secrets and variables → Actions):
13-
# No extra secrets are required beyond the default GITHUB_TOKEN.
14-
# If you also deploy to Maven Central, add:
15-
# MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD, GPG_PRIVATE_KEY, GPG_PASSPHRASE
12+
# Publishing is handled by JitPack — no deploy step needed.
13+
# JitPack picks up the GitHub Release tag automatically and builds on demand.
14+
#
15+
# Requirements: no secrets beyond the default GITHUB_TOKEN.
1616
# =============================================================================
1717

1818
name: Release to Maven Repository
@@ -33,7 +33,6 @@ on:
3333

3434
permissions:
3535
contents: write # create GitHub Release
36-
packages: write # deploy to GitHub Packages
3736

3837
env:
3938
JAVA_VERSION: '8'
@@ -80,10 +79,6 @@ jobs:
8079
java-version: ${{ env.JAVA_VERSION }}
8180
distribution: temurin
8281
cache: maven
83-
# Server configuration for GitHub Packages deploy
84-
server-id: github
85-
server-username: MAVEN_USERNAME
86-
server-password: MAVEN_PASSWORD
8782

8883
# ── Version bump (transient — not committed back) --------------------
8984
# The tag is the source of truth for the version. We apply it in-place
@@ -100,31 +95,6 @@ jobs:
10095
- name: Build & run tests
10196
run: mvn ${MAVEN_CLI_OPTS} clean verify
10297

103-
# ── Deploy: GitHub Packages -------------------------------------------
104-
- name: Deploy to GitHub Packages
105-
run: >
106-
mvn ${MAVEN_CLI_OPTS} deploy -DskipTests
107-
-DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
108-
env:
109-
MAVEN_USERNAME: ${{ github.actor }}
110-
MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
111-
112-
# ── Deploy: Maven Central (optional) ----------------------------------
113-
# Uncomment this section and add the following secrets to your repo:
114-
# MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD, GPG_PRIVATE_KEY, GPG_PASSPHRASE
115-
#
116-
# Also add <distributionManagement> to your root pom.xml:
117-
# <distributionManagement>
118-
# <snapshotRepository><id>ossrh</id><url>...</url></snapshotRepository>
119-
# <repository><id>ossrh</id><url>...</url></repository>
120-
# </distributionManagement>
121-
#
122-
# - name: Deploy to Maven Central
123-
# run: mvn ${MAVEN_CLI_OPTS} deploy -Prelease
124-
# env:
125-
# MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
126-
# MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
127-
12898
# ── GitHub Release ----------------------------------------------------
12999
- name: Create GitHub Release
130100
uses: softprops/action-gh-release@v2
@@ -137,7 +107,15 @@ jobs:
137107
### Changes
138108
- Updated api.yaml from ZenBPM ${{ steps.version.outputs.version }}
139109
- Generated updated REST client and DTOs
140-
- Published to GitHub Packages
110+
111+
### Using this release via JitPack
112+
```xml
113+
<dependency>
114+
<groupId>com.github.pbinitiative.zenbpm-java-client</groupId>
115+
<artifactId>zenbpm-spring-boot-starter</artifactId>
116+
<version>${{ steps.version.outputs.version }}</version>
117+
</dependency>
118+
```
141119
files: |
142120
zenbpm-client-core/target/*.jar
143121
zenbpm-spring-boot-starter/target/*.jar

README.md

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,62 @@
1414
## Build this project
1515
``mvn clean package``
1616

17-
## Getting started
17+
## Using the library
1818

19-
Add the starter to your application and the core client as needed.
19+
Artifacts are served via **[JitPack](https://jitpack.io)** — no authentication or extra secrets required.
20+
21+
### 1 — Add the JitPack repository to your pom.xml
22+
23+
```xml
24+
<repositories>
25+
<repository>
26+
<id>jitpack.io</id>
27+
<url>https://jitpack.io</url>
28+
</repository>
29+
</repositories>
30+
```
31+
32+
### 2 — Add the dependencies
33+
34+
Latest release: **v1.3.0**
35+
36+
For multi-module projects JitPack uses `com.github.{owner}.{repo}` as the groupId.
37+
The version is the git tag exactly as pushed (e.g. `v1.3.0`).
2038

21-
Maven:
2239
```xml
40+
<properties>
41+
<zenbpm.version>v1.3.0</zenbpm.version>
42+
</properties>
43+
44+
<!-- Spring Boot starter (includes auto-configuration) -->
2345
<dependency>
24-
<groupId>org.zenbpm</groupId>
46+
<groupId>com.github.pbinitiative.zenbpm-java-client</groupId>
2547
<artifactId>zenbpm-spring-boot-starter</artifactId>
26-
<version>${project.version}</version>
48+
<version>${zenbpm.version}</version>
2749
</dependency>
50+
51+
<!-- Core REST + gRPC client (without Spring auto-configuration) -->
2852
<dependency>
29-
<groupId>org.zenbpm</groupId>
53+
<groupId>com.github.pbinitiative.zenbpm-java-client</groupId>
3054
<artifactId>zenbpm-client-core</artifactId>
31-
<version>${project.version}</version>
55+
<version>${zenbpm.version}</version>
56+
</dependency>
57+
58+
<!-- gRPC transport – required at runtime -->
59+
<dependency>
60+
<groupId>io.grpc</groupId>
61+
<artifactId>grpc-netty-shaded</artifactId>
62+
<version>1.78.0</version>
63+
<scope>runtime</scope>
3264
</dependency>
3365
```
3466

35-
Configure connection settings in application.yml
67+
JitPack builds the library on the first request for a given version and caches it
68+
thereafter. If a version shows as "unknown" the first resolution may take ~1–2 minutes.
69+
70+
## Configuration
71+
72+
Configure connection settings in `application.yml`.
3673

3774
values shown in `zenbpm` section are defaults.
3875

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk8

0 commit comments

Comments
 (0)