You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: actions/gradle/publish/README.md
+268Lines changed: 268 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,3 +11,271 @@ Before you use this publish Action, you will need to configure your Github proje
11
11
Your project needs to be already set up with Gradle and must have a gradle wrapper file in order to use the Action.
12
12
13
13
The Action expects you to have built the artifacts using the SLSA Gradle builder and that the provenance is available in `./build/libs/slsa-attestations/`.
14
+
15
+
## Using the Gradle Publish action
16
+
17
+
To use the Gradle action you need to:
18
+
19
+
1. Modify your `build.gradle.kts` file.
20
+
2. Add the step in your release workflow that invokes it.
21
+
22
+
### Modify your `build.gradle.kts` file
23
+
24
+
Assuming you have already configured your Gradle repository to release to Maven Central, your `build.gradle.kts` looks something like this:
Set the values of "maven-username", "maven-password", "gpg-key-pass" and " gpg-private-key" for your account. The parameters to `provenance-download-name`, `provenance-download-sha256` and `target-download-sha256` should not be changed.
272
+
273
+
Once you trigger this workflow, your artifacts and provenance files will be added to a staging repository in Maven Central. You need to close the staging repository and then release:
274
+
275
+
Closing the staging repository:
276
+
277
+

278
+
279
+
Releasing:
280
+
281
+

0 commit comments