Skip to content

Commit e25f61a

Browse files
committed
make build reproducable
1 parent 20aea03 commit e25f61a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ jobs:
222222
distribution: 'temurin'
223223
java-version: ${{ env.JAVA_VERSION }}
224224
cache: 'maven'
225-
- name: Ensure to use tagged version
226-
run: ./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
225+
- name: Ensure to use tagged version and update build timestamp
226+
run: |
227+
./mvnw versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
228+
./mvnw versions:set-property --file ./pom.xml -Dproperty=project.build.outputTimestamp -DnewVersion="$(date --iso-8601=seconds)"
227229
- name: Build
228230
run: >
229231
./mvnw -B install -DskipTests

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
<java.version>25</java.version>
4141
<jextract.path>${user.home}/.sdkman/candidates/jextract/current/bin/jextract</jextract.path>
4242
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
43+
<!-- TODO: for reproducible builds, can be removed with Maven 4 -->
44+
<project.build.outputTimestamp>2026-01-26T00:00:00Z</project.build.outputTimestamp>
4345

4446
<jb-annotations.version>26.0.2-1</jb-annotations.version>
4547

0 commit comments

Comments
 (0)