Skip to content

Commit 47a842f

Browse files
committed
Test the release workflow (a throwaway branch, not a release)
1 parent 2e433dd commit 47a842f

56 files changed

Lines changed: 2650 additions & 621 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/release.yml‎

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Written by DocSpring/docspring's api_clients/scripts/generate from api_clients/github_workflows/java/release.yml:
2+
# change it there.
3+
#
4+
# Builds the package on every push and pull request. A v* tag (pushed by the monorepo's api_clients/scripts/release)
5+
# also signs it and publishes it to Maven Central, in the release environment, and waits until Maven Central serves
6+
# it. Maven Central has no trusted publishing: the release environment's secrets hold a Central Portal user token
7+
# (MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD) and the signing key (MAVEN_GPG_PRIVATE_KEY, MAVEN_GPG_PASSPHRASE).
8+
# OpenAPI Generator's maven.yml runs the package's tests.
9+
name: Release
10+
11+
on:
12+
push:
13+
branches: ['**']
14+
tags: ['v*']
15+
pull_request:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25+
with:
26+
persist-credentials: false
27+
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
28+
with:
29+
distribution: temurin
30+
java-version: '17'
31+
cache: maven
32+
# The runner's Maven is 3.10, which puts maven-metadata-local.xml and _remote.repositories in the bundle the
33+
# Central publishing plugin (0.10.0) uploads, and Central rejects it. Maven 3.9 doesn't.
34+
- name: Install Maven 3.9.16
35+
run: |
36+
curl -fsSL -o "$RUNNER_TEMP/maven.tar.gz" https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz
37+
echo "831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6 $RUNNER_TEMP/maven.tar.gz" | sha512sum -c -
38+
tar -xzf "$RUNNER_TEMP/maven.tar.gz" -C "$RUNNER_TEMP"
39+
echo "$RUNNER_TEMP/apache-maven-3.9.16/bin" >> "$GITHUB_PATH"
40+
- name: Check the tag matches the package version
41+
if: github.ref_type == 'tag'
42+
run: |
43+
VERSION="$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)"
44+
if [ "v$VERSION" != "$GITHUB_REF_NAME" ]; then
45+
echo "::error::The tag is $GITHUB_REF_NAME, but the package version is $VERSION"
46+
exit 1
47+
fi
48+
- run: mvn -B -ntp -DskipTests -DskipITs package
49+
50+
publish:
51+
needs: build
52+
if: github.ref_type == 'tag'
53+
runs-on: ubuntu-latest
54+
environment: release
55+
steps:
56+
# Maven builds, signs and uploads the package from the source in one deploy
57+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
58+
with:
59+
persist-credentials: false
60+
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
61+
with:
62+
distribution: temurin
63+
java-version: '17'
64+
server-id: central
65+
server-username: MAVEN_CENTRAL_USERNAME
66+
server-password: MAVEN_CENTRAL_PASSWORD
67+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
68+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
69+
# The runner's Maven is 3.10, which puts maven-metadata-local.xml and _remote.repositories in the bundle the
70+
# Central publishing plugin (0.10.0) uploads, and Central rejects it. Maven 3.9 doesn't.
71+
- name: Install Maven 3.9.16
72+
run: |
73+
curl -fsSL -o "$RUNNER_TEMP/maven.tar.gz" https://archive.apache.org/dist/maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz
74+
echo "831a8591fe20c8243b1dbe7d71e3244f31d1665b0804b2e825e38cbbe5ce0cafb8338851f90780735568773e0a6cd07bbec107cda0b896b008b861075358b6f6 $RUNNER_TEMP/maven.tar.gz" | sha512sum -c -
75+
tar -xzf "$RUNNER_TEMP/maven.tar.gz" -C "$RUNNER_TEMP"
76+
echo "$RUNNER_TEMP/apache-maven-3.9.16/bin" >> "$GITHUB_PATH"
77+
# The sign-artifacts profile signs with the imported key, and the Central publishing plugin publishes the upload
78+
# once Central has validated it (autoPublish)
79+
- run: mvn -B -ntp -DskipTests -DskipITs -P sign-artifacts -DperformRelease=true clean deploy
80+
env:
81+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
82+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
83+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
84+
85+
verify:
86+
needs: publish
87+
runs-on: ubuntu-latest
88+
timeout-minutes: 75
89+
steps:
90+
# Maven Central can take an hour to serve a published release
91+
- name: Wait until Maven Central serves the version
92+
run: |
93+
VERSION="${GITHUB_REF_NAME#v}"
94+
for _ in $(seq 120); do
95+
if curl -fsS -o /dev/null "https://repo1.maven.org/maven2/com/docspring/DocSpring/$VERSION/DocSpring-$VERSION.pom"; then
96+
echo "Maven Central serves com.docspring:DocSpring $VERSION"
97+
exit 0
98+
fi
99+
sleep 30
100+
done
101+
echo "::error::Maven Central doesn't serve com.docspring:DocSpring $VERSION after an hour"
102+
exit 1

‎CHANGELOG.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### 4.4.0 [October 31, 2026]
2+
3+
- New: page designs (`template_type` `page_designer`), PDFs designed in the Page Designer from a JSON layout, with no
4+
document to start from. create_template makes one from its `layout`, or with an empty page when `layout` is left
5+
out, and update_template replaces its layout. DocSpring adds a field for each value the layout reads. A template's
6+
`layout` is in the [Page Designer layout format](https://docspring.com/docs/page-designer/layout-format/) (its
7+
[JSON Schema](https://docspring.com/schemas/page-designer/layout.v1.json)), and is null for other templates.
8+
- New: every method that creates, changes or deletes something takes an `Idempotency-Key` header, as its last argument,
9+
`idempotencyKey`. Send the same key when you send a request again after a timeout or a network error: within 24 hours,
10+
DocSpring returns the first response instead of running the request twice. Arguments you already pass keep their
11+
places, but Java has no optional arguments: add `null` to the end of your calls to these methods when you don't send
12+
a key (create_submission, create_submission_batch and create_combined_pdf already took one).
13+
- Changed: the request validator checks what API v2 now refuses: an ID, a query value or a template name that's blank or
14+
only whitespace, an update with nothing to change, a version with a leading zero (`01`), a `filename` with a slash, a
15+
signer `email` that isn't an email address, and an HTML template's `scale` outside 0.1 to 2.
16+
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.
17+
118
### 4.3.0 [October 31, 2026]
219

320
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ e-signatures.
1010
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1111
pull requests are welcome.
1212

13-
Version 4.3.0. Requires Java 8 or later.
13+
Version 4.4.0. Requires Java 8 or later.
1414

1515
## Install and configure
1616

@@ -20,14 +20,14 @@ Version 4.3.0. Requires Java 8 or later.
2020
<dependency>
2121
<groupId>com.docspring</groupId>
2222
<artifactId>DocSpring</artifactId>
23-
<version>4.3.0</version>
23+
<version>4.4.0</version>
2424
</dependency>
2525
```
2626

2727
**Gradle**: add to your `build.gradle`:
2828

2929
```groovy
30-
implementation 'com.docspring:DocSpring:4.3.0'
30+
implementation 'com.docspring:DocSpring:4.4.0'
3131
```
3232

3333
Configure authentication via environment variables:

0 commit comments

Comments
 (0)