Commit e780b15c99f5e92ba205ce897cce3c3db3dcbc73

Authored by Jay Berkenbilt
1 parent a898bb3a

Update release process instructions

* Based on feedback, keep gpg as well as cosign for the indefinite
  future
* Streamline release creation process by using the `gh` command-line
  tool (GitHub's official CLI) rather than old-school curl directly
  against the GitHub API, a procedure that predates the `gh` command.
README-maintainer.md
... ... @@ -607,13 +607,7 @@ When done, the following should happen:
607 607  
608 608 ## CREATING A RELEASE
609 609  
610   -* Until qpdf 13: see also README-maintainer.md from v12.2.0 for
611   - additional gpg signing steps. This includes signing the releases
612   - with gpg. Do this before running cosign. Also use `git tag -s`
613   - instead of `git tag -a`. When we deprecate gpg signing, this can be
614   - removed.
615   -
616   -* Releases are signed using
  610 +* Releases are dual signed with GPG and also with
617 611 [cosign](https://docs.sigstore.dev/quickstart/quickstart-cosign/)
618 612 using your GitHub identity. If you are creating a release, please
619 613 make sure your correct identity is listed in README.md under
... ... @@ -629,6 +623,7 @@ When done, the following should happen:
629 623  
630 624 ```sh
631 625 version=x.y.z
  626 +gpg --detach-sign --armor qpdf-$version.tar.gz
632 627 ```
633 628  
634 629 * From the release directory, sign the releases. You need
... ... @@ -639,6 +634,8 @@ version=x.y.z
639 634 \rm -f *.sha256
640 635 files=(*)
641 636 sha256sum ${files[*]} >| qpdf-$version.sha256
  637 +gpg --clearsign --armor qpdf-$version.sha256
  638 +mv qpdf-$version.sha256.asc qpdf-$version.sha256
642 639 cosign sign-blob qpdf-$version.sha256 --bundle qpdf-$version.sha256.sigstore
643 640 chmod 444 *
644 641 chmod 555 *.AppImage
... ... @@ -655,7 +652,7 @@ chmod 555 *.AppImage
655 652  
656 653 ```sh
657 654 git rev-parse qpdf/main @
658   -git tag -a v$version @ -m"qpdf $version"
  655 +git tag -s v$version @ -m"qpdf $version"
659 656 git push qpdf v$version
660 657 ```
661 658  
... ... @@ -670,37 +667,8 @@ git push qpdf @:stable
670 667 https://readthedocs.org/projects/qpdf/versions/ (log in with
671 668 github), and activate the latest major/minor version
672 669  
673   -* Create a github release after pushing the tag. `gcurl` is an alias
674   - that includes the auth token.
675   -
676   -```sh
677   -# Create release
678   -
679   -GITHUB_TOKEN=$(qdata-show cred github-token)
680   -function gcurl() { curl -H "Authorization: token $GITHUB_TOKEN" ${1+"$@"}; }
681   -
682   -url=$(gcurl -s -XPOST https://api.github.com/repos/qpdf/qpdf/releases -d'{"tag_name": "v'$version'", "name": "qpdf '$version'", "draft": true}' | jq -r '.url')
683   -
684   -# Get upload url
685   -upload_url=$(gcurl -s $url | jq -r '.upload_url' | sed -E -e 's/\{.*\}//')
686   -echo $upload_url
687   -```
688   -
689   -* From the release area, Upload all the files.
690   -
691   -```sh
692   -for i in *; do
693   - mime=$(file -b --mime-type $i)
694   - gcurl -H "Content-Type: $mime" --data-binary @$i "$upload_url?name=$i"
695   -done
696   -```
697   -
698   -Go onto github, and make any manual updates such as indicating a
699   -pre-release, adding release notes, etc.
700   -
701   -Here is a template for the release notes. Change
702   -`README-what-to-download` to just a file reference for SourceForge
703   -since there is no relative link target from the news area.
  670 +* Create a notes file for the GitHub release. Copy the template below
  671 + to /tmp/notes.md and edit as needed.
704 672  
705 673 ```markdown
706 674 This is qpdf version x.y.z. (Brief description, summary of highlights)
... ... @@ -710,28 +678,31 @@ For a full list of changes from previous releases, please see the [release notes
710 678 This release was signed by enter-email@address.here.
711 679 ```
712 680  
713   -* Publish release. This can be done most easily directly from the
714   - GitHub UI. As an alternative, or you can run
  681 +* Create a github release after pushing the tag. Use `gh` (GitHub
  682 + CLI). This assumes you have `GH_TOKEN` set or are logged in. This
  683 + must be run from the repository directory.
715 684  
716 685 ```sh
717   -gcurl -XPOST $url -d'{"draft": false}'
  686 +release=/path/to/release/$version
  687 +gh release create -R qpdf/qpdf v$version --title "qpdf version $version" -F /tmp/notes.md $release/*
718 688 ```
719 689  
720 690 * Upload files to sourceforge. Replace `sourceforge_login` with your
721   - SourceForge login.
  691 + SourceForge login. **NOTE**: The command below passes `-n` to rsync.
  692 + This is no-op. Run it once to make sure it does the right thing,
  693 + then run it again without `-n` to actually copy the files.
722 694  
723 695 ```sh
724   -rsync -vrlcO ./ sourceforge_login,qpdf@frs.sourceforge.net:/home/frs/project/q/qp/qpdf/qpdf/$version/
  696 +release=/path/to/release/$version
  697 +rsync -n -vrlcO $release/ sourceforge_login,qpdf@frs.sourceforge.net:/home/frs/project/q/qp/qpdf/qpdf/$version/
725 698 ```
726 699  
727 700 * On sourceforge, make the source package the default for all but
728 701 Windows, and make the 64-bit msvc build the default for Windows.
729 702  
730 703 * Publish a news item manually on sourceforge using the release notes
731   - text. Remove the relative link to README-what-to-download.md (just
732   - reference the file by name)
733   -
734   -* Upload the debian package and Ubuntu ppa backports.
  704 + text. **Remove the relative link to README-what-to-download.md** (just
  705 + reference the file by name).
735 706  
736 707 * Email the qpdf-announce list. Mention the email address of the release signer.
737 708  
... ...
README.md
... ... @@ -15,7 +15,7 @@ is https://qpdf.sourceforge.io. The source code repository is hosted at GitHub:
15 15  
16 16 # Verifying Distributions
17 17  
18   -Official qpdf releases are signed using [cosign](https://docs.sigstore.dev/quickstart/quickstart-cosign/). Each release includes a `sha256` file containing sha256 checksums of all the release files. To verify a release, use `cosign verify-blob`. Example:
  18 +Official qpdf releases are signed using [cosign](https://docs.sigstore.dev/quickstart/quickstart-cosign/). Each release includes a `sha256` file containing sha256 checksums of all the release files. To verify a release, use `sha256sum file`, or similar, to generate the checksum of the file you want to verify and check to make sure it matches what's in the sha256 file. You can verify the sha256 file itself with gpg or with `cosign verify-blob`. Example:
19 19  
20 20 ```
21 21 cosign verify-blob qpdf-x.y.z.sha256 --bundle qpdf-x.y.z.sha256.sigstore \
... ... @@ -28,7 +28,7 @@ The identity `signer-identity@qpdf.org` should be replaced with the name of the
28 28 * Jay Berkenbilt <ejb@ql.org>
29 29 * Manfred Holger <m.holger@qpdf.org>
30 30  
31   -qpdf versions prior to version 13 were also signed using Jay Berkenbilt's GPG key, which has fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or downloaded from a public key server. Starting with qpdf 13, releases are signed only using cosign.
  31 +You can also verify qpdf releases using Jay Berkenbilt's GPG key, which has fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or downloaded from a public key server.
32 32  
33 33 # Copyright, License
34 34  
... ...
manual/release-notes.rst
... ... @@ -31,11 +31,9 @@ more detail.
31 31 12.3.0: January 10, 2026
32 32 - Release changes
33 33  
34   - - Starting with version 12.3.0, we use
35   - `cosign <https://docs.sigstore.dev/cosign/>`__, rather than GPG,
36   - to sign releases. See the top-level README.md for instructions.
37   - We will continue to use GPG for the 12.x series. Starting with
38   - qpdf version 13, only cosign will be used.
  34 + - Starting with version 12.3.0, we use `cosign
  35 + <https://docs.sigstore.dev/cosign/>`__, in addition to GPG, to
  36 + sign releases. See the top-level README.md for instructions.
39 37  
40 38 - Build changes
41 39  
... ...