Skip to content

Commit accb849

Browse files
committed
Add artifact checksum verification to release procedures
1 parent 50bb17c commit accb849

File tree

2 files changed

+63
-26
lines changed

2 files changed

+63
-26
lines changed

build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ dependencies {
4141
}
4242

4343
allprojects {
44-
ext.snapshotSuffix = "<count>.g<sha>-SNAPSHOT<dirty>"
45-
ext.dirtyMarker = "-DIRTY"
46-
47-
apply plugin: 'com.cinnober.gradle.semver-git'
4844
apply plugin: 'idea'
4945

46+
if (System.env.VERSION) {
47+
it.version = System.env.VERSION
48+
} else {
49+
ext.snapshotSuffix = "<count>.g<sha>-SNAPSHOT<dirty>"
50+
ext.dirtyMarker = "-DIRTY"
51+
apply plugin: 'com.cinnober.gradle.semver-git'
52+
}
53+
5054
idea.module {
5155
downloadJavadoc = true
5256
downloadSources = true

doc/releasing.md

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,55 @@ Release candidate versions
4545
Check that this version is available in GitHub Actions. Commit this change,
4646
if any.
4747
48-
5. Tag the head commit with an `X.Y.Z-RCN` tag:
48+
5. Push the branch to GitHub.
49+
50+
If the pre-release makes significant changes to the project README, such
51+
that the README does not accurately reflect the latest non-pre-release
52+
version, push the changes on a separate release branch:
4953
5054
```
51-
$ git tag -a -s 1.4.0-RC1 -m "Pre-release 1.4.0-RC1"
55+
$ git checkout -b release-1.4.0
56+
$ git push origin release-1.4.0
5257
```
5358
54-
No tag body needed.
59+
If the README still accurately reflects the latest non-pre-release version,
60+
you can simply push to main instead:
5561
56-
6. Publish to Sonatype Nexus:
62+
```
63+
$ git push origin main
64+
```
65+
66+
6. Wait for the ["build" workflow][workflow-build] to finish.
67+
Download the `artifact-checksums-java17-temurin` artifact,
68+
unpack it and verify that the artifact checksums match artifacts built locally:
5769
5870
```
59-
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
71+
$ unzip artifact-checksums-java17-temurin.zip
72+
$ VERSION=0.1.0-SNAPSHOT ./gradlew primaryPublishJar
73+
$ sha256sum -c java-webauthn-server-artifacts.sha256sum
6074
```
6175
62-
7. Push to GitHub.
76+
7. Tag the head commit with an `X.Y.Z-RCN` tag:
6377
64-
If the pre-release makes significant changes to the project README, such
65-
that the README does not accurately reflect the latest non-pre-release
66-
version, push the changes on a separate release branch:
78+
```
79+
$ git tag -a -s 1.4.0-RC1 -m "Pre-release 1.4.0-RC1"
80+
```
81+
82+
No tag body needed.
83+
84+
8. Publish to Sonatype Nexus:
6785
6886
```
69-
$ git checkout -b release-1.4.0
70-
$ git push origin release-1.4.0 1.4.0-RC1
87+
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
7188
```
7289
73-
If the README still accurately reflects the latest non-pre-release version,
74-
you can simply push to main instead:
90+
9. Push the tag to GitHub:
7591
7692
```
77-
$ git push origin main 1.4.0-RC1
93+
$ git push origin 1.4.0-RC1
7894
```
7995
80-
8. Make GitHub release.
96+
10. Make GitHub release.
8197
8298
- Use the new tag as the release tag.
8399
- Check the pre-release checkbox.
@@ -87,7 +103,7 @@ Release candidate versions
87103
- Note the JDK version shown by `java -version` in step 3.
88104
For example: `openjdk version "17.0.7" 2023-04-18`.
89105
90-
9. Check that the ["Reproducible binary" workflow][workflow-release] runs and succeeds.
106+
11. Check that the ["Reproducible binary" workflow][workflow-release] runs and succeeds.
91107
92108
93109
Release versions
@@ -168,27 +184,43 @@ Release versions
168184
$ ./gradlew clean check
169185
```
170186
171-
10. Tag the merge commit with an `X.Y.Z` tag:
187+
10. Push the branch to GitHub:
188+
189+
```
190+
$ git push origin main
191+
```
192+
193+
11. Wait for the ["build" workflow][workflow-build] to finish.
194+
Download the `artifact-checksums-java17-temurin` artifact,
195+
unpack it and verify that the artifact checksums match artifacts built locally:
196+
197+
```
198+
$ unzip artifact-checksums-java17-temurin.zip
199+
$ VERSION=0.1.0-SNAPSHOT ./gradlew primaryPublishJar
200+
$ sha256sum -c java-webauthn-server-artifacts.sha256sum
201+
```
202+
203+
12. Tag the merge commit with an `X.Y.Z` tag:
172204
173205
```
174206
$ git tag -a -s 1.4.0 -m "Release 1.4.0"
175207
```
176208
177209
No tag body needed since that's included in the commit.
178210
179-
11. Publish to Sonatype Nexus:
211+
12. Publish to Sonatype Nexus:
180212
181213
```
182214
$ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
183215
```
184216
185-
12. Push to GitHub:
217+
13. Push the tag to GitHub:
186218
187219
```
188-
$ git push origin main 1.4.0
220+
$ git push origin 1.4.0
189221
```
190222
191-
13. Make GitHub release.
223+
14. Make GitHub release.
192224
193225
- Use the new tag as the release tag.
194226
- Copy the release notes from `NEWS` into the GitHub release notes; reformat
@@ -197,8 +229,9 @@ Release versions
197229
- Note the JDK version shown by `java -version` in step 6.
198230
For example: `openjdk version "17.0.7" 2023-04-18`.
199231
200-
14. Check that the ["Reproducible binary" workflow][workflow-release] runs and succeeds.
232+
15. Check that the ["Reproducible binary" workflow][workflow-release] runs and succeeds.
201233
202234
235+
[workflow-build]: https://github.com/Yubico/java-webauthn-server/actions/workflows/build.yml
203236
[workflow-release]: https://github.com/Yubico/java-webauthn-server/actions/workflows/release-verify-signatures.yml
204237
[workflow-release-src]: https://github.com/Yubico/java-webauthn-server/blob/main/.github/workflows/release-verify-signatures.yml#L42

0 commit comments

Comments
 (0)