Skip to content

Commit 0f2aa4d

Browse files
committed
Release v1.3.0
1 parent 5db334c commit 0f2aa4d

267 files changed

Lines changed: 7756 additions & 7730 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,51 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12+
913
permissions:
1014
contents: read
1115

1216
jobs:
1317
build:
14-
runs-on: ubuntu-latest
15-
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ ubuntu-latest, windows-latest ]
23+
java: [ '21', '25' ]
24+
include:
25+
- os: ubuntu-latest
26+
java: '21'
27+
primary: true
1628
steps:
1729
- uses: actions/checkout@v6
1830

19-
- name: Set up JDK 21
31+
- name: Set up JDK ${{ matrix.java }}
2032
uses: actions/setup-java@v5
2133
with:
22-
java-version: '21'
34+
java-version: ${{ matrix.java }}
2335
distribution: 'temurin'
2436
cache: maven
2537

26-
- name: Check formatting
27-
run: ./mvnw spotless:check
28-
2938
- name: Build and test
39+
shell: bash
3040
run: ./mvnw clean verify
41+
42+
- name: Upload test results
43+
if: failure()
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: surefire-reports-${{ matrix.os }}-jdk${{ matrix.java }}
47+
path: target/surefire-reports/
48+
retention-days: 14
49+
50+
- name: Upload coverage to Codecov
51+
if: matrix.primary
52+
uses: codecov/codecov-action@v5
53+
with:
54+
token: ${{ secrets.CODECOV_TOKEN }}
55+
files: target/site/jacoco/jacoco.xml
56+
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Release
2+
3+
# Tag-driven release: pushing `vX.Y.Z` runs the full release pipeline (build → OWASP → sign → publish to Maven Central).
4+
# The git tag must match `<version>` in pom.xml (without the `v` prefix). Anything else fails fast.
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
workflow_dispatch:
11+
inputs:
12+
ref:
13+
description: 'Tag to release (e.g. v1.3.0)'
14+
required: true
15+
type: string
16+
17+
permissions:
18+
contents: read
19+
security-events: write
20+
21+
jobs:
22+
release:
23+
runs-on: ubuntu-latest
24+
environment: maven-central
25+
env:
26+
# Exposed at job level so setup-java sees the passphrase during the GPG key import step,
27+
# not only during the deploy step that exports it explicitly for maven-gpg-plugin.
28+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v6
32+
with:
33+
ref: ${{ github.event.inputs.ref || github.ref }}
34+
fetch-depth: 0
35+
36+
- name: Set up JDK 21
37+
uses: actions/setup-java@v5
38+
with:
39+
java-version: '21'
40+
distribution: 'temurin'
41+
cache: maven
42+
server-id: central
43+
server-username: CENTRAL_USERNAME
44+
server-password: CENTRAL_PASSWORD
45+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
46+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
47+
48+
- name: Verify tag matches pom version
49+
run: |
50+
set -euo pipefail
51+
tag="${GITHUB_REF_NAME:-${{ github.event.inputs.ref }}}"
52+
tag_version="${tag#v}"
53+
pom_version="$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)"
54+
if [ "$tag_version" != "$pom_version" ]; then
55+
echo "Tag $tag (version=$tag_version) does not match pom.xml version $pom_version" >&2
56+
exit 1
57+
fi
58+
echo "tag_version=$tag_version" >> "$GITHUB_ENV"
59+
60+
- name: Capture commit timestamp for reproducible build
61+
run: |
62+
ts="$(git log -1 --format=%cI HEAD)"
63+
echo "Reproducible build timestamp: $ts"
64+
echo "BUILD_OUTPUT_TIMESTAMP=$ts" >> "$GITHUB_ENV"
65+
66+
- name: Deploy to Maven Central
67+
env:
68+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
69+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
70+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
71+
TZ: UTC
72+
LC_ALL: C.UTF-8
73+
run: >
74+
./mvnw --batch-mode --no-transfer-progress
75+
-Prelease
76+
-Dproject.build.outputTimestamp=${{ env.BUILD_OUTPUT_TIMESTAMP }}
77+
clean deploy
78+
79+
- name: Upload OWASP dependency-check report
80+
if: always()
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: dependency-check-report
84+
path: |
85+
target/dependency-check-report.html
86+
target/dependency-check-report.json
87+
target/dependency-check-report.sarif
88+
if-no-files-found: ignore
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Verify Reproducibility
2+
3+
on:
4+
schedule:
5+
- cron: '0 6 * * 1'
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Release tag to verify'
10+
required: true
11+
12+
jobs:
13+
verify:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
ref: ${{ github.event.inputs.tag }}
19+
fetch-depth: 0
20+
21+
- uses: actions/setup-java@v5
22+
with:
23+
java-version: '21'
24+
distribution: 'temurin'
25+
cache: maven
26+
27+
- name: Verify reproducibility against Maven Central
28+
env:
29+
TZ: UTC
30+
LC_ALL: C.UTF-8
31+
run: |
32+
ts=$(git log -1 --format=%cI HEAD)
33+
./mvnw -B -Dproject.build.outputTimestamp="$ts" clean install -DskipTests
34+
./mvnw -B artifact:compare

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ build/
2828
/src/test/resources/data-files/*.json
2929
!/src/test/resources/data-files/regression_*.json
3030
.claude
31-
.mvn/wrapper/maven-wrapper.jar
31+
.mvn/wrapper/maven-wrapper.jar
32+
TODO.md

0 commit comments

Comments
 (0)