Skip to content

release: harden release.sh and automate draft GitHub releases - #2185

Merged
kolyshkin merged 8 commits into
containers:mainfrom
giuseppe:improve-release-script
Aug 19, 2026
Merged

release: harden release.sh and automate draft GitHub releases#2185
kolyshkin merged 8 commits into
containers:mainfrom
giuseppe:improve-release-script

Conversation

@giuseppe

Copy link
Copy Markdown
Member

Description:
Improves the release process in small, self-contained steps.

build-aux/release.sh

  • Dedupe the target architectures into a single ARCHES array.
  • Preflight-check required tools (container runtime, git, make, and gpg2 unless SKIP_GPG) so a missing tool fails fast with a clear message instead of minutes into the build.
  • Harden the NEWS gate: match the exact * crun-$VERSION header line instead of a substring regex, with an actionable error.
  • Clean up generated intermediates (result/, .tarball-git-version.h) via an EXIT trap; OUTDIR is left in place for inspection.

CI (.github/workflows/release.yaml)

  • Add a release job that reuses the existing artifact build. On a tag push it downloads the built binaries/tarballs, renames them with the version, regenerates CHECKSUMS, extracts the release notes from NEWS, and opens a draft GitHub release with the assets attached.
  • The job fails if NEWS has no * crun-<tag> section, so a release is never published with an empty body.
  • It is a draft so the maintainer can add the local GPG (.asc) signatures before publishing. Normal pushes/PRs are unaffected.

build-aux/download-release.sh

  • New helper that downloads all assets of a (draft) release into a local directory, so they can be GPG-signed before publishing. Version defaults to git-version-gen; the repo is auto-detected from git remotes.

@kolyshkin this should simplify the task of making a release, the only task left to run locally is signing the artifacts.

@packit-as-a-service

Copy link
Copy Markdown

Ephemeral COPR build failed. @containers/packit-build please check.

giuseppe and others added 8 commits August 13, 2026 12:51
it is not useful for crun.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Define the target architectures once in an ARCHES array instead of
hardcoding them inline in the build loop, so future changes touch a
single place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Verify the container runtime, git, make, and gpg2 (unless SKIP_GPG) are
available before starting, so a missing tool fails immediately with a
clear message instead of minutes into the build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Match the exact release header line '* crun-$VERSION' with a
fixed-string, whole-line grep instead of a substring regex that could
match unrelated text, and print an actionable error when it is missing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Remove the 'result' symlink dir and .tarball-git-version.h via an EXIT
trap so they no longer linger after a run or a failure.  OUTDIR is left
in place for inspection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Add a 'release' job that reuses the existing artifact build.  On a tag
push it downloads the built binaries and tarballs, renames them with the
version, regenerates a CHECKSUMS file, extracts the release notes from
NEWS, and opens a draft GitHub release with the assets attached.

It is a draft so the maintainer can add the local GPG (.asc) signatures
before publishing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Guarantee the release notes come from NEWS: abort the job when the
'* crun-<tag>' section is missing or empty instead of publishing a
release with an empty body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Add a helper that downloads all assets of a (draft) GitHub release into
a local directory, so the maintainer can GPG-sign them before publishing.
The version defaults to git-version-gen and the repository is auto-detected
from the git remotes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe
giuseppe force-pushed the improve-release-script branch from 88168c8 to 504be22 Compare August 13, 2026 10:51

@kolyshkin kolyshkin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM, thanks

@kolyshkin
kolyshkin merged commit ba38286 into containers:main Aug 19, 2026
46 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants