Skip to content

Commit fc09f77

Browse files
committed
release 2.1.0 on maven central
1 parent 901faa3 commit fc09f77

8 files changed

Lines changed: 334 additions & 21 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
description: Draft and publish a GitHub release for the current pom version, with AI-written categorized notes covering merged PRs AND direct commits.
3+
argument-hint: "[--draft] [version]"
4+
allowed-tools: Bash(git:*), Bash(gh:*), Bash(./mvnw:*), Read, Write
5+
---
6+
7+
Prepare a GitHub release for this repository (`ebics-java/ebics-java-client`). Follow these
8+
steps. Do NOT create the tag or release until the user has approved the drafted notes.
9+
10+
## 1. Determine the version and previous tag
11+
- Version to release: `./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout`
12+
(or use an explicit version passed in `$ARGUMENTS`). The tag is the bare version, e.g. `2.1.0`
13+
(no `v` prefix — match existing tags). The release title is `EBICS Java Version <version>`.
14+
- Previous released tag: the most recent existing tag by version, e.g.
15+
`git tag --sort=-v:refname | head -5` — pick the highest tag that is not the new version.
16+
17+
## 2. Gather the raw material (this is the whole point — cover EVERYTHING, not just PRs)
18+
- All commits in range, including direct-to-master commits and merges:
19+
`git log <prev>..HEAD --pretty=format:'%h %s (%an)'`
20+
- GitHub's PR-based data (for accurate PR links, @author attribution, new contributors, and the
21+
compare URL):
22+
`gh api repos/ebics-java/ebics-java-client/releases/generate-notes -f tag_name=<version> -f previous_tag_name=<prev> -f target_commitish=master --jq '.body'`
23+
24+
## 3. Draft the notes
25+
Write clean Markdown release notes that:
26+
- Group changes under these headings (omit any that are empty):
27+
`## New Features & Enhancements`, `## Bug Fixes`, `## Dependency Updates`, `## Other Changes`.
28+
- Reword terse commit subjects into clear, user-facing bullets (e.g. drop `feat(cli):` prefixes,
29+
make them read as human sentences). Do not invent changes — every bullet must trace to a real
30+
commit or PR.
31+
- Include direct-to-master commits that have no PR, alongside the PR-based entries.
32+
- Preserve PR links and `@author` attribution where a change came from a PR.
33+
- Keep a `## New Contributors` section and the `**Full Changelog**: <compare-url>` line from the
34+
generated data if present.
35+
- Lead with a one or two sentence summary of the release if there's a notable theme.
36+
37+
## 4. Review with the user
38+
Show the full drafted notes in the chat and ask the user to approve or request edits. STOP here
39+
until they approve. Iterate on wording if asked.
40+
41+
## 5. Publish (only after approval)
42+
- Confirm local `HEAD` is pushed to `origin/master` (`git rev-parse HEAD` == `git rev-parse origin/master`); warn if not.
43+
- Create the tag if it does not exist, then push it:
44+
`git tag <version>` (skip if it exists) and `git push origin <version>`.
45+
- Write the approved notes to a temp file in the scratchpad, then create the release:
46+
`gh release create <version> --title "EBICS Java Version <version>" --notes-file <file> --verify-tag`
47+
- If `$ARGUMENTS` contains `--draft`, add `--draft` so the user can eyeball it on GitHub before
48+
it goes public.
49+
- Report the release URL that `gh` prints.

.github/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Controls how GitHub groups the auto-generated release notes
2+
# (used by `gh release create --generate-notes` and the "Generate release notes" button).
3+
# PRs are bucketed by their labels; anything unlabeled falls under "Other changes".
4+
changelog:
5+
exclude:
6+
labels:
7+
- ignore-for-release
8+
categories:
9+
- title: New Features & Enhancements
10+
labels:
11+
- enhancement
12+
- feature
13+
- title: Bug Fixes
14+
labels:
15+
- bug
16+
- fix
17+
- title: Dependency Updates
18+
labels:
19+
- dependencies
20+
- title: Other Changes
21+
labels:
22+
- "*"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.idea
33
*.iml
44
/client/
5+
/.envrc

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,59 @@ mvn exec:java \
3232

3333
This mode is useful for containerized or ephemeral environments where `ebics.txt` should not be persisted.
3434

35-
You can build it directly from the source with maven or use the releases from [JitPack](https://jitpack.io/#ebics-java/ebics-java-client/).
35+
The library is published to [Maven Central](https://central.sonatype.com/artifact/io.github.ebics-java/ebics-java-client).
3636

37-
Gradle:
37+
Maven:
38+
```
39+
<dependency>
40+
<groupId>io.github.ebics-java</groupId>
41+
<artifactId>ebics-java-client</artifactId>
42+
<version>2.1.0</version>
43+
</dependency>
3844
```
39-
allprojects {
40-
repositories {
41-
...
42-
maven { url 'https://jitpack.io' }
43-
}
44-
}
4545

46+
Gradle:
47+
```
4648
dependencies {
47-
implementation 'com.github.ebics-java:ebics-java-client:2.0.0'
49+
implementation 'io.github.ebics-java:ebics-java-client:2.1.0'
4850
}
4951
```
50-
Maven
52+
53+
You can also build it directly from the source with Maven (`./mvnw clean install`).
54+
See [RELEASING.md](RELEASING.md) for how releases are published to Maven Central.
55+
56+
### Snapshot / unreleased builds via JitPack
57+
58+
To pull in a specific commit or an unreleased version (any tag, branch, or commit hash) before it
59+
reaches Maven Central, use [JitPack](https://jitpack.io/#ebics-java/ebics-java-client):
60+
61+
Maven:
5162
```
5263
<repositories>
53-
<repository>
54-
<id>jitpack.io</id>
55-
<url>https://jitpack.io</url>
56-
</repository>
64+
<repository>
65+
<id>jitpack.io</id>
66+
<url>https://jitpack.io</url>
67+
</repository>
5768
</repositories>
5869
5970
<dependency>
6071
<groupId>com.github.ebics-java</groupId>
6172
<artifactId>ebics-java-client</artifactId>
62-
<version>2.0.0</version>
73+
<version>master-SNAPSHOT</version> <!-- or a tag, branch, or commit hash -->
6374
</dependency>
6475
```
65-
76+
77+
Gradle:
78+
```
79+
repositories {
80+
maven { url 'https://jitpack.io' }
81+
}
82+
83+
dependencies {
84+
implementation 'com.github.ebics-java:ebics-java-client:master-SNAPSHOT'
85+
}
86+
```
87+
88+
Note that JitPack builds keep the `com.github.ebics-java` group id (derived from the GitHub repo),
89+
whereas released artifacts on Maven Central use `io.github.ebics-java`.
90+

pom.xml

Lines changed: 109 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>org.kopi</groupId>
5-
<artifactId>ebics</artifactId>
4+
<groupId>io.github.ebics-java</groupId>
5+
<artifactId>ebics-java-client</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.0.0</version>
8-
<name>ebics</name>
7+
<version>2.1.0</version>
8+
<name>EBICS Java Client</name>
9+
<description>EBICS (Electronic Banking Internet Communication Standard) client library for Java.
10+
Supports EBICS 3.0 and French, German and Swiss banks, with a command line client for
11+
bank setup, key initialization and file download.</description>
912
<url>https://github.com/ebics-java/ebics-java-client</url>
13+
14+
<licenses>
15+
<license>
16+
<name>GNU Lesser General Public License, Version 2.1</name>
17+
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
18+
<distribution>repo</distribution>
19+
</license>
20+
</licenses>
21+
22+
<developers>
23+
<developer>
24+
<id>ebics-java</id>
25+
<name>EBICS Java Client contributors</name>
26+
<url>https://github.com/ebics-java/ebics-java-client/graphs/contributors</url>
27+
</developer>
28+
</developers>
29+
30+
<scm>
31+
<connection>scm:git:https://github.com/ebics-java/ebics-java-client.git</connection>
32+
<developerConnection>scm:git:git@github.com:ebics-java/ebics-java-client.git</developerConnection>
33+
<url>https://github.com/ebics-java/ebics-java-client</url>
34+
<tag>HEAD</tag>
35+
</scm>
1036
<dependencies>
1137
<dependency>
1238
<groupId>org.apache.xmlbeans</groupId>
@@ -81,7 +107,13 @@
81107
<xmlConfigs>
82108
src/main/xsd/config/config.xsdconfig
83109
</xmlConfigs>
84-
110+
<!--
111+
Pin the generated metadata package and schema-system name to fixed, valid Java
112+
identifiers. Both default to the Maven coordinates, which now contain hyphens
113+
(io.github.ebics-java / ebics-java-client) and would produce an invalid package.
114+
-->
115+
<name>ebics</name>
116+
<repackage>org.kopi.ebics.metadata</repackage>
85117
</configuration>
86118
</plugin>
87119
<plugin>
@@ -115,4 +147,76 @@
115147
<properties>
116148
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
117149
</properties>
150+
151+
<!--
152+
The `release` profile is only needed to publish to Maven Central. It adds a Javadoc jar,
153+
GPG signatures and the Central Portal publishing plugin. A normal build/install
154+
(`./mvnw clean install`) does NOT activate it, so the library can be built locally without
155+
any signing keys or Central credentials. See scripts/release.sh and RELEASING.md.
156+
-->
157+
<profiles>
158+
<profile>
159+
<id>release</id>
160+
<build>
161+
<plugins>
162+
<plugin>
163+
<groupId>org.apache.maven.plugins</groupId>
164+
<artifactId>maven-javadoc-plugin</artifactId>
165+
<version>3.12.0</version>
166+
<executions>
167+
<execution>
168+
<id>attach-javadocs</id>
169+
<goals>
170+
<goal>jar</goal>
171+
</goals>
172+
</execution>
173+
</executions>
174+
<configuration>
175+
<!-- The XMLBeans-generated sources are not Javadoc-clean; don't fail the release on them. -->
176+
<doclint>none</doclint>
177+
<failOnError>false</failOnError>
178+
<quiet>true</quiet>
179+
</configuration>
180+
</plugin>
181+
<plugin>
182+
<groupId>org.apache.maven.plugins</groupId>
183+
<artifactId>maven-gpg-plugin</artifactId>
184+
<version>3.2.8</version>
185+
<executions>
186+
<execution>
187+
<id>sign-artifacts</id>
188+
<phase>verify</phase>
189+
<goals>
190+
<goal>sign</goal>
191+
</goals>
192+
<configuration>
193+
<!--
194+
Use the built-in BouncyCastle signer: no `gpg` binary or keyring needed.
195+
The armored private key and its passphrase are read from the environment
196+
(MAVEN_GPG_KEY / MAVEN_GPG_PASSPHRASE), which scripts/release.sh populates
197+
from the out-of-repo credentials file.
198+
-->
199+
<signer>bc</signer>
200+
</configuration>
201+
</execution>
202+
</executions>
203+
</plugin>
204+
<plugin>
205+
<groupId>org.sonatype.central</groupId>
206+
<artifactId>central-publishing-maven-plugin</artifactId>
207+
<version>0.11.0</version>
208+
<extensions>true</extensions>
209+
<configuration>
210+
<!-- Credentials come from the <server id="central"> entry in release-settings.xml. -->
211+
<publishingServerId>central</publishingServerId>
212+
<!-- Upload to a staged deployment; publish manually from the Central Portal after review. -->
213+
<autoPublish>false</autoPublish>
214+
<!-- Name the deployment after its coordinates (otherwise it shows as "Deployment"). -->
215+
<deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
216+
</configuration>
217+
</plugin>
218+
</plugins>
219+
</build>
220+
</profile>
221+
</profiles>
118222
</project>

release-settings.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Maven settings used only when publishing to Maven Central (see scripts/release.sh).
4+
Contains NO secrets: the Central Portal token is injected from the environment by the
5+
release script, which reads it from the out-of-repo credentials file. Safe to commit.
6+
-->
7+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
8+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
10+
<servers>
11+
<server>
12+
<id>central</id>
13+
<username>${env.CENTRAL_USERNAME}</username>
14+
<password>${env.CENTRAL_PASSWORD}</password>
15+
</server>
16+
</servers>
17+
</settings>

scripts/github-release.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright Uwe Maurer
4+
#
5+
# Tag the current pom version and publish a GitHub release with an auto-generated changelog.
6+
#
7+
# GitHub builds the changelog from the pull requests merged since the previous tag; the
8+
# grouping is configured in .github/release.yml. Run this AFTER the Maven Central release
9+
# (scripts/release.sh) has been published, from a clean, pushed master.
10+
#
11+
# Usage:
12+
# scripts/github-release.sh # tag <version>, push it, create the release
13+
# scripts/github-release.sh --draft # extra flags are forwarded to `gh release create`
14+
#
15+
set -euo pipefail
16+
17+
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
18+
cd "$REPO_ROOT"
19+
20+
VERSION="$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)"
21+
TAG="$VERSION"
22+
TITLE="EBICS Java Version $VERSION"
23+
24+
echo "Releasing $TAG ($TITLE)"
25+
26+
# Create the tag locally if it does not exist yet, then push it.
27+
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
28+
echo "Tag $TAG already exists locally."
29+
else
30+
git tag "$TAG"
31+
fi
32+
git push origin "$TAG"
33+
34+
# Create the GitHub release with notes generated from merged PRs since the previous tag.
35+
gh release create "$TAG" --title "$TITLE" --generate-notes --verify-tag "$@"

0 commit comments

Comments
 (0)