Skip to content

Commit c2ee36f

Browse files
committed
feat: pre-release maintenance
1 parent 22804ad commit c2ee36f

File tree

4 files changed

+59
-19
lines changed

4 files changed

+59
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,14 @@ jobs:
9999
- name: Checkout code
100100
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
101101

102+
- name: Create GitHub App token
103+
id: app-token
104+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
105+
with:
106+
app-id: ${{ secrets.SUMUP_BOT_APP_ID }}
107+
private-key: ${{ secrets.SUMUP_BOT_PRIVATE_KEY }}
108+
102109
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
103110
with:
104-
token: ${{ secrets.GITHUB_TOKEN }}
111+
token: ${{ steps.app-token.outputs.token }}
105112
target-branch: ${{ github.ref_name }}

.github/workflows/release-pr-maintenance.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
with:
2828
script: |
2929
const fs = require('fs');
30-
const core = require('@actions/core');
3130
const version = fs.readFileSync('VERSION', 'utf8').trim();
3231
if (!version) {
3332
throw new Error('VERSION file is empty');
@@ -36,14 +35,31 @@ jobs:
3635
const readmePath = 'README.md';
3736
const original = fs.readFileSync(readmePath, 'utf8');
3837
39-
const gradlePattern = /(implementation\("com\.sumup:sumup-sdk:)([^"]+)("\))/;
40-
let gradleUpdated = false;
41-
const afterGradle = original.replace(gradlePattern, (_, prefix, _current, suffix) => {
42-
gradleUpdated = true;
43-
return `${prefix}${version}${suffix}`;
44-
});
45-
if (!gradleUpdated) {
46-
throw new Error('Gradle dependency snippet not found in README.md');
38+
const kotlinGradlePattern = /(implementation\("com\.sumup:sumup:)([^"]+)("\))/;
39+
let kotlinGradleUpdated = false;
40+
const afterKotlinGradle = original.replace(
41+
kotlinGradlePattern,
42+
(_, prefix, _current, suffix) => {
43+
kotlinGradleUpdated = true;
44+
return `${prefix}${version}${suffix}`;
45+
}
46+
);
47+
if (!kotlinGradleUpdated) {
48+
throw new Error('Gradle (Kotlin DSL) dependency snippet not found in README.md');
49+
}
50+
51+
const groovyGradlePattern =
52+
/(implementation\s+['"]com\.sumup:sumup:)([^'"]+)(['"])/;
53+
let groovyGradleUpdated = false;
54+
const afterGradle = afterKotlinGradle.replace(
55+
groovyGradlePattern,
56+
(_, prefix, _current, suffix) => {
57+
groovyGradleUpdated = true;
58+
return `${prefix}${version}${suffix}`;
59+
}
60+
);
61+
if (!groovyGradleUpdated) {
62+
throw new Error('Gradle (Groovy) dependency snippet not found in README.md');
4763
}
4864
4965
const mavenPattern = /(<version>)([^<]+)(<\/version>)/;

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# SumUp Java SDK
44

5-
[![Maven Central Version](https://img.shields.io/maven-central/v/com.sumup/sumup-java?strategy=releaseProperty)](https://mvnrepository.com/artifact/com.sumup/sumup-java)
5+
[![Maven Central Version](https://img.shields.io/maven-central/v/com.sumup/sumup?strategy=releaseProperty)](https://mvnrepository.com/artifact/com.sumup/sumup)
66
[![Documentation][docs-badge]](https://developer.sumup.com)
77
[![CI Status](https://github.com/sumup/sumup-java/actions/workflows/ci.yaml/badge.svg)](https://github.com/sumup/sumup-java/actions/workflows/ci.yaml)
88
[![License](https://img.shields.io/github/license/sumup/sumup-java)](./LICENSE)
@@ -13,30 +13,42 @@ _**IMPORTANT:** This SDK is under heavy development and subject to breaking chan
1313

1414
The Java SDK for the SumUp [API](https://developer.sumup.com) generated from the canonical OpenAPI specification. Requires Java 17 or newer.
1515

16-
## Getting Started
16+
## Installation
17+
18+
### Gradle (Kotlin DSL)
1719

18-
Add the SDK to your project via Gradle (Kotlin DSL):
20+
Add the dependency in your `build.gradle.kts` file:
1921

2022
```kotlin
21-
repositories {
22-
mavenCentral()
23+
dependencies {
24+
implementation("com.sumup:sumup:0.0.1")
2325
}
26+
```
27+
28+
### Gradle (Groovy)
2429

30+
Add the dependency in your `build.gradle` file:
31+
32+
```groovy
2533
dependencies {
26-
implementation("com.sumup:sumup-sdk:0.1.0-SNAPSHOT")
34+
implementation 'com.sumup:sumup:0.0.1'
2735
}
2836
```
2937

30-
or Maven:
38+
### Maven
39+
40+
Add the dependency in your `pom.xml` file:
3141

3242
```xml
3343
<dependency>
3444
<groupId>com.sumup</groupId>
35-
<artifactId>sumup-sdk</artifactId>
36-
<version>0.1.0-SNAPSHOT</version>
45+
<artifactId>sumup</artifactId>
46+
<version>0.0.1</version>
3747
</dependency>
3848
```
3949

50+
## Getting Started
51+
4052
Authenticate with a personal access token before making calls:
4153

4254
```bash

src/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ plugins {
77
id 'signing'
88
}
99

10+
base {
11+
archivesName = 'sumup'
12+
}
13+
1014
java {
1115
withSourcesJar()
1216
withJavadocJar()
@@ -48,6 +52,7 @@ tasks.withType(Javadoc).configureEach {
4852
publishing {
4953
publications {
5054
mavenJava(MavenPublication) {
55+
artifactId = 'sumup'
5156
from components.java
5257

5358
pom {

0 commit comments

Comments
 (0)