Skip to content

Commit 7fa4395

Browse files
authored
ci: enable SBOMs (#1748)
1 parent 6259d2e commit 7fa4395

File tree

3 files changed

+45
-18
lines changed

3 files changed

+45
-18
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
contents: write # IMPORTANT: required for action to create release branch
3535
pull-requests: write # IMPORTANT: so release PR can be created
3636
id-token: write # IMPORTANT: mandatory for trusted publishing
37+
attestations: write # IMPORTANT: mandatory for attestations
3738
steps:
3839
- name: Checkout timefold-solver
3940
uses: actions/checkout@v5
@@ -57,12 +58,6 @@ jobs:
5758
distribution: 'temurin'
5859
cache: 'maven'
5960

60-
# Need Maven 3.9.0+ to recognize MAVEN_ARGS.
61-
- name: Set up Maven
62-
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
63-
with:
64-
maven-version: 3.9.3
65-
6661
# We skip tests in dry run, to make the process faster.
6762
# Technically, this goes against the main reason for doing a dry run; to eliminate potential problems.
6863
# But unless something catastrophic happened, PR checks on source branch already ensured that all tests pass.
@@ -96,3 +91,12 @@ jobs:
9691
path: |
9792
out/jreleaser/trace.log
9893
out/jreleaser/output.properties
94+
95+
- id: set-artifacts-output
96+
run: echo "ARTIFACTS=$(cat out/jreleaser/catalogs/github/timefold-solver-${{ github.event.inputs.version }})" >> $GITHUB_OUTPUT
97+
98+
- name: Attestations
99+
uses: actions/attest-build-provenance@v1
100+
with:
101+
subject-path: |
102+
${{ steps.set-artifacts-output.outputs.ARTIFACTS }}

jreleaser.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,30 @@ signing:
66
active: ALWAYS
77
armored: true
88

9+
catalog:
10+
github:
11+
active: ALWAYS
12+
attestationName: 'timefold-solver-{{projectVersion}}'
13+
excludes:
14+
- '**/*.asc'
15+
916
release:
1017
github:
1118
commitAuthor:
1219
name: "Timefold Release Bot"
1320
14-
releaseName: "Timefold Solver Community Edition {{projectVersion}}"
21+
releaseName: "Timefold Solver {{projectVersion}}"
1522
draft: true
1623
overwrite: false
1724
sign: true
1825
milestone:
1926
close: true
20-
name: "v{{projectVersion}}"
2127
changelog:
2228
formatted: ALWAYS
2329
preset: "conventional-commits"
2430
contentTemplate: ".github/workflows/release-changelog-template.md"
2531
contributors:
26-
format: "- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}"
32+
format: '- {{contributorName}} ({{contributorUsernameAsLink}})'
2733
hide:
2834
uncategorized: true
2935
categories:
@@ -35,7 +41,7 @@ release:
3541
deploy:
3642
maven:
3743
mavenCentral:
38-
timefold:
44+
timefold-solver:
3945
active: ALWAYS
4046
url: https://central.sonatype.com/api/v1/publisher
4147
authorization: BASIC
@@ -45,10 +51,6 @@ deploy:
4551
stagingRepositories:
4652
- "target/staging-deploy"
4753
artifactOverrides:
48-
- groupId: ai.timefold.solver
49-
artifactId: timefold-solver-core
50-
sourceJar: false
51-
javadocJar: false
5254
- groupId: ai.timefold.solver
5355
artifactId: timefold-solver-spring-boot-starter
5456
sourceJar: false
@@ -60,4 +62,4 @@ deploy:
6062
- groupId: ai.timefold.solver
6163
artifactId: timefold-solver-webui
6264
sourceJar: true
63-
javadocJar: false
65+
javadocJar: false

pom.xml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<version.rewrite.plugin>6.16.0</version.rewrite.plugin>
3232
<version.source.plugin>3.3.1</version.source.plugin>
3333
<version.resources.plugin>3.3.1</version.resources.plugin>
34+
<version.cyclonedx.plugin>2.9.1</version.cyclonedx.plugin>
3435
<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
3536
<sonar.sources>.</sonar.sources>
3637
<sonar.tests>.</sonar.tests>
@@ -95,6 +96,11 @@
9596
<legacyMode>true</legacyMode>
9697
</configuration>
9798
</plugin>
99+
<plugin>
100+
<groupId>org.cyclonedx</groupId>
101+
<artifactId>cyclonedx-maven-plugin</artifactId>
102+
<version>${version.cyclonedx.plugin}</version>
103+
</plugin>
98104
</plugins>
99105
</pluginManagement>
100106
</build>
@@ -141,14 +147,29 @@
141147
</execution>
142148
</executions>
143149
</plugin>
150+
<plugin>
151+
<groupId>org.cyclonedx</groupId>
152+
<artifactId>cyclonedx-maven-plugin</artifactId>
153+
<executions>
154+
<execution>
155+
<phase>package</phase>
156+
<goals>
157+
<goal>makeAggregateBom</goal>
158+
</goals>
159+
<configuration>
160+
<excludeTestProject>true</excludeTestProject>
161+
</configuration>
162+
</execution>
163+
</executions>
164+
</plugin>
144165
</plugins>
145166
</build>
146167
</profile>
147168
<profile>
148169
<!--
149-
Migration to Timefold 9 involves upgrading to Quarkus 3, Spring Boot 3 and migrating to jakarta.* packages.
150-
Timefold 8 remains compatible with Quarkus 2, Spring Boot 2 and javax.* packages.
151-
Both Timefold 8 and 9 are functionally equal and will be released simultaneously.
170+
Migration to Timefold 0.9 involves upgrading to Quarkus 3, Spring Boot 3 and migrating to jakarta.* packages.
171+
Timefold 0.8 remains compatible with Quarkus 2, Spring Boot 2 and javax.* packages.
172+
Both Timefold 0.8 and 0.9 are functionally equal.
152173
-->
153174
<id>8-to-9-migration</id>
154175
<activation>

0 commit comments

Comments
 (0)