Skip to content

Commit 387d8f2

Browse files
committed
chore:upgrade zenbpm version to v1.3.0
1 parent d3e37d8 commit 387d8f2

5 files changed

Lines changed: 2056 additions & 222 deletions

File tree

.github/workflows/release.yaml

Lines changed: 24 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
# =============================================================================
22
# Release pipeline for zenbpm-java-client
33
#
4-
# Automatically triggered when ZenBPM (pbinitiative/zenbpm) publishes a new
5-
# release. Copies the latest api.yaml from ZenBPM, bumps the project version
6-
# to match, builds, and deploys to the configured Maven repository.
4+
# Triggered when a version tag (e.g. v1.2.3) is pushed to this repository.
5+
# The expected flow is:
6+
# 1. Another pipeline (e.g. pbinitiative/zenbpm) updates api.yaml in this
7+
# repo and commits it to main.
8+
# 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.
711
#
812
# Requirements (set up in GitHub repo Settings → Secrets and variables → Actions):
9-
# Secret: ZENBPM_READ_TOKEN
10-
# A GitHub Personal Access Token (classic or fine-grained) with at least
11-
# "Contents: read" access to pbinitiative/zenbpm. Used to check out the
12-
# matching tag from the upstream ZenBPM repo.
13-
#
14-
# To trigger from ZenBPM's release workflow, add a step like:
15-
# - name: Trigger Java client release
16-
# uses: peter-evans/repository-dispatch@v3
17-
# with:
18-
# token: ${{ secrets.ZENBPM_JAVA_CLIENT_ACCESS_TOKEN }}
19-
# repository: pbinitiative/zenbpm-java-client
20-
# event-type: release-upstream
21-
# client-payload: '{"version": "${{ github.ref_name }}"}'
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
2216
# =============================================================================
2317

2418
name: Release to Maven Repository
2519

2620
on:
27-
# 1) Automated trigger from ZenBPM's own release workflow
28-
repository_dispatch:
29-
types: [release-upstream]
21+
# Triggered by pushing a version tag, e.g.: git tag v1.2.3 && git push origin v1.2.3
22+
push:
23+
tags:
24+
- 'v*'
3025

31-
# 2) Manual trigger for testing or ad-hoc releases
26+
# Manual trigger for testing or ad-hoc releases
3227
workflow_dispatch:
3328
inputs:
3429
version:
@@ -37,7 +32,7 @@ on:
3732
type: string
3833

3934
permissions:
40-
contents: write # create GitHub Release + tag, push version bump commit
35+
contents: write # create GitHub Release
4136
packages: write # deploy to GitHub Packages
4237

4338
env:
@@ -54,8 +49,8 @@ jobs:
5449
id: version
5550
run: |
5651
case "${{ github.event_name }}" in
57-
repository_dispatch)
58-
VERSION="${{ github.event.client_payload.version }}"
52+
push)
53+
VERSION="${{ github.ref_name }}"
5954
;;
6055
workflow_dispatch)
6156
VERSION="${{ github.event.inputs.version }}"
@@ -75,28 +70,8 @@ jobs:
7570
# ── Checkout sources --------------------------------------------------
7671
- name: Checkout zenbpm-java-client
7772
uses: actions/checkout@v4
78-
79-
- name: Checkout ZenBPM at matching tag
80-
uses: actions/checkout@v4
8173
with:
82-
repository: pbinitiative/zenbpm
83-
ref: ${{ steps.version.outputs.version }}
84-
token: ${{ secrets.ZENBPM_READ_TOKEN }}
85-
path: upstream/zenbpm
86-
87-
# ── Copy api.yaml -----------------------------------------------------
88-
- name: Copy api.yaml from ZenBPM
89-
run: |
90-
SRC="upstream/zenbpm/openapi/api.yaml"
91-
DST="zenbpm-client-core/src/main/resources/openapi/api.yaml"
92-
93-
if [ ! -f "$SRC" ]; then
94-
echo "ERROR: api.yaml not found at ${SRC}"
95-
exit 1
96-
fi
97-
98-
cp -v "$SRC" "$DST"
99-
echo "Copied api.yaml ($(wc -l < "$DST") lines)"
74+
fetch-depth: 1
10075

10176
# ── Java + Maven setup ------------------------------------------------
10277
- name: Set up JDK ${{ env.JAVA_VERSION }}
@@ -110,23 +85,17 @@ jobs:
11085
server-username: MAVEN_USERNAME
11186
server-password: MAVEN_PASSWORD
11287

113-
# ── Version bump ------------------------------------------------------
114-
- name: Update project version to match ZenBPM release
88+
# ── Version bump (transient — not committed back) --------------------
89+
# The tag is the source of truth for the version. We apply it in-place
90+
# so that the built artifacts carry the right version, but we do not
91+
# push any changes back to the repo.
92+
- name: Set project version to match tag
11593
run: |
11694
mvn ${MAVEN_CLI_OPTS} \
11795
versions:set \
11896
-DnewVersion="${{ steps.version.outputs.version_no_v }}" \
11997
-DgenerateBackupPoms=false
12098
121-
# ── Commit version bump -----------------------------------------------
122-
- name: Commit and push version bump
123-
run: |
124-
git config user.name "github-actions[bot]"
125-
git config user.email "github-actions[bot]@users.noreply.github.com"
126-
git add "**/pom.xml" zenbpm-client-core/src/main/resources/openapi/api.yaml
127-
git commit -m "chore: release ${{ steps.version.outputs.version }}"
128-
git push
129-
13099
# ── Build --------------------------------------------------------------
131100
- name: Build & run tests
132101
run: mvn ${MAVEN_CLI_OPTS} clean verify
@@ -165,8 +134,6 @@ jobs:
165134
body: |
166135
## ZenBPM Java Client ${{ steps.version.outputs.version }}
167136
168-
This release corresponds to ZenBPM [${{ steps.version.outputs.version }}](https://github.com/pbinitiative/zenbpm/releases/tag/${{ steps.version.outputs.version }}).
169-
170137
### Changes
171138
- Updated api.yaml from ZenBPM ${{ steps.version.outputs.version }}
172139
- Generated updated REST client and DTOs

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.zenbpm</groupId>
77
<artifactId>zenbpm-java-client</artifactId>
8-
<version>v0.3.9</version>
8+
<version>1.3.0</version>
99
<packaging>pom</packaging>
1010

1111
<modules>

zenbpm-client-core/pom.xml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.zenbpm</groupId>
88
<artifactId>zenbpm-java-client</artifactId>
9-
<version>v0.3.9</version>
9+
<version>1.3.0</version>
1010
</parent>
1111

1212
<artifactId>zenbpm-client-core</artifactId>
@@ -21,6 +21,7 @@
2121
<swagger-annotations.version>1.5.22</swagger-annotations.version>
2222
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
2323
<jsr305.version>3.0.2</jsr305.version>
24+
<javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
2425
<grpc.version>1.78.0</grpc.version>
2526
<protobuf-java.version>4.33.2</protobuf-java.version>
2627
</properties>
@@ -49,6 +50,12 @@
4950
<version>${javax.annotation-api.version}</version>
5051
</dependency>
5152

53+
<dependency>
54+
<groupId>javax.ws.rs</groupId>
55+
<artifactId>javax.ws.rs-api</artifactId>
56+
<version>${javax.ws.rs-api.version}</version>
57+
</dependency>
58+
5259
<dependency>
5360
<groupId>com.google.code.findbugs</groupId>
5461
<artifactId>jsr305</artifactId>
@@ -110,7 +117,7 @@
110117
<plugin>
111118
<groupId>org.openapitools</groupId>
112119
<artifactId>openapi-generator-maven-plugin</artifactId>
113-
<version>7.17.0</version>
120+
<version>6.6.0</version>
114121
<executions>
115122
<execution>
116123
<phase>generate-sources</phase>
@@ -136,32 +143,28 @@
136143
<dateLibrary>java8</dateLibrary>
137144
<useTags>true</useTags>
138145
<interfaceOnly>false</interfaceOnly>
146+
<openApiNullable>false</openApiNullable>
139147
</configOptions>
140148
</configuration>
141149
</execution>
142150
</executions>
143151
</plugin>
144152

145153
<plugin>
146-
<groupId>io.github.ascopes</groupId>
154+
<groupId>org.xolstice.maven.plugins</groupId>
147155
<artifactId>protobuf-maven-plugin</artifactId>
156+
<version>0.6.1</version>
148157
<configuration>
149-
<protoc>${protobuf-java.version}</protoc>
150-
<sourceDirectories>
151-
<directory>src/main/resources/proto</directory>
152-
</sourceDirectories>
153-
<plugins>
154-
<plugin kind="binary-maven">
155-
<groupId>io.grpc</groupId>
156-
<artifactId>protoc-gen-grpc-java</artifactId>
157-
<version>${grpc.version}</version>
158-
</plugin>
159-
</plugins>
158+
<protocArtifact>com.google.protobuf:protoc:${protobuf-java.version}:exe:${os.detected.classifier}</protocArtifact>
159+
<pluginId>grpc-java</pluginId>
160+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
161+
<protoSourceRoot>${project.basedir}/src/main/resources/proto</protoSourceRoot>
160162
</configuration>
161163
<executions>
162164
<execution>
163165
<goals>
164-
<goal>generate</goal>
166+
<goal>compile</goal>
167+
<goal>compile-custom</goal>
165168
</goals>
166169
</execution>
167170
</executions>

0 commit comments

Comments
 (0)