Skip to content

ci: create release as verified draft with docs and SBOM assets - #609

Draft
umaucher wants to merge 4 commits into
mainfrom
um_release_workflow_draft
Draft

umaucher wants to merge 4 commits into
mainfrom
um_release_workflow_draft

Conversation

@umaucher

@umaucher umaucher commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the release workflow: verification first, then a draft release (annotated tag, coverage/test report, docs zip, SBOM, checksums) that a maintainer publishes. Publishing fires release: published, which deploys the tagged docs; a release created with GITHUB_TOKEN never did.

  • release.yml: dispatch entry point with the verification jobs.
  • release_core.yml: reusable core without persistency specifics (candidate for cicd-workflows).
  • .github/release.yml: groups dependencies/renovate PRs in the generated notes.
  • .github/RELEASE_TEMPLATE.md: header prepended to the generated notes.

Tried end to end on a fork (dry run, draft, publish, tagged docs). Real releases are refused on non-default branches; use dry_run=true to try it from this branch.

The release is now created only after build, tests and coverage passed,
as a draft that a maintainer reviews and publishes. Publishing the draft
triggers the tagged docs deployment, which a release created with
GITHUB_TOKEN never did. Dependency PRs are grouped in the notes.

Signed-off-by: Uwe Maucher <205777204+umaucher@users.noreply.github.com>
A glob that matches a single artifact is extracted without its own
directory, so the verification report was split into one zip per
top-level folder. Downloading by name keeps it as one asset.

Signed-off-by: Uwe Maucher <205777204+umaucher@users.noreply.github.com>
Dry runs stay possible from any branch so the workflow can be tested
before it is merged, but a tag must never be created from a PR branch.

Signed-off-by: Uwe Maucher <205777204+umaucher@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Starting local Bazel server (8.7.0) and connecting to it...
INFO: Invocation ID: 44d8af10-5aea-413a-9491-b957a8ac9fd8
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 2 packages loaded
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

Analyzing: target //:license-check (52 packages loaded, 14 targets configured)

Analyzing: target //:license-check (99 packages loaded, 14 targets configured)

Analyzing: target //:license-check (100 packages loaded, 14 targets configured)

Analyzing: target //:license-check (100 packages loaded, 14 targets configured)

Analyzing: target //:license-check (153 packages loaded, 2628 targets configured)

Analyzing: target //:license-check (201 packages loaded, 4435 targets configured)

Analyzing: target //:license-check (205 packages loaded, 8582 targets configured)

Analyzing: target //:license-check (207 packages loaded, 11661 targets configured)

Analyzing: target //:license-check (208 packages loaded, 11785 targets configured)

Analyzing: target //:license-check (208 packages loaded, 11785 targets configured)

Analyzing: target //:license-check (212 packages loaded, 17774 targets configured)

INFO: Analyzed target //:license-check (213 packages loaded, 17903 targets configured).
[12 / 16] [Prepa] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes ... (2 actions, 0 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 50 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/tools/formatted.txt
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building tools/license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //tools:license.check.license_check up-to-date:
  bazel-bin/tools/license.check.license_check
  bazel-bin/tools/license.check.license_check.jar
INFO: Elapsed time: 49.710s, Critical Path: 2.86s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/tools/license.check.license_check tools/formatted.txt <args omitted>
[main] INFO Querying Eclipse Foundation for license data for 42 items.
[main] INFO Found 32 items.
[main] INFO Querying ClearlyDefined for license data for 10 items.
[main] INFO Found 10 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO crate/cratesio/-/lazy_static/1.5.1
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The default-branch restriction accepts same-named tags, and asset collection fails with multiple Bazel targets.

2 open issues
What changed in this PR

Reworks release automation to verify commits before creating a draft release for maintainer publication, enabling the existing tagged-documentation deployment flow.

Changes:

  • Gates release creation on build, test, coverage, and component integration verification.
  • Adds a reusable release core for tagging, asset packaging, checksums, and dry runs.
  • Adds a release-note template and dependency-update grouping.
File Description
.github/​workflows/​release.yml Coordinates verification and calls the reusable release workflow.
.github/​workflows/​release_core.yml Validates release inputs and assembles tags, drafts, and assets.
.github/​release.yml Groups dependency updates in generated release notes.
.github/​RELEASE_TEMPLATE.md Adds release metadata and documentation links to release notes.

Review effort: Balanced

set -euo pipefail

# Dry runs may use any branch, e.g. to test this workflow before it is merged.
if [[ "$DRY_RUN" != "true" && "$REF_NAME" != "$DEFAULT_BRANCH" ]]; then
bazel build "${flags[@]}" "${targets[@]}"

mkdir -p dist
bazel cquery "${flags[@]}" --output=files "${targets[@]}" | while read -r file; do
@umaucher

Copy link
Copy Markdown
Contributor Author

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-609: https://eclipse-score.github.io/persistency/pr-609/

@umaucher

Copy link
Copy Markdown
Contributor Author

Trying the workflow from the command line

Needs gh with write access to the repo. Before this PR is merged only the dry run is possible; real releases are refused on any branch except main.

Dry run (works from this branch)

gh workflow run release.yml --repo eclipse-score/persistency \
  --ref um_release_workflow_draft -f tag=v9.9.9-test1 -f dry_run=true

RUN=$(gh run list --repo eclipse-score/persistency --workflow release.yml --limit 1 --json databaseId --jq '.[0].databaseId')
gh run watch "$RUN" --repo eclipse-score/persistency --exit-status
gh run download "$RUN" --repo eclipse-score/persistency --name release-assets-v9.9.9-test1 --dir /tmp/release-assets

Expected (same as on a fork): all jobs green, no tag, no release. The workflow artifact release-assets-v9.9.9-test1 contains
persistency-<tag>-docs.zip, -sbom_product.spdx.json, -sbom_product.cdx.json, -verification-report.zip and SHA256SUMS.txt.

Real run (only after merge, from main)

gh workflow run release.yml --repo eclipse-score/persistency --ref main -f tag=v0.4.0 -f dry_run=false

Expected: after the verification jobs, an annotated tag v0.4.0 on the dispatched commit and a draft release (pre-release only if the tag has a -suffix) with the assets above, a header from .github/RELEASE_TEMPLATE.md and GitHub's generated notes, grouped by .github/release.yml. Nothing is public yet.

Review the draft, then publish it (UI or gh release edit v0.4.0 --repo eclipse-score/persistency --draft=false). Publishing fires release: published, so Docs Build and Docs Publish deploy the docs to /v0.4.0/ and add it to versions.json.

From this branch, dry_run=false fails in the first job with Real releases must run on 'main', not 'um_release_workflow_draft'. Use a dry run. and creates nothing.

Undo

What Created by Undo
Dry run nothing in the repo, only a workflow artifact (30 days) gh run delete <run-id> --repo eclipse-score/persistency (optional)
Draft release and tag real run gh release delete v0.4.0 --repo eclipse-score/persistency --cleanup-tag --yes
Published release publishing the draft same command as above
Tagged docs Docs Publish after publishing delete the v0.4.0/ folder and its entry in versions.json on the gh-pages branch

The workflow never commits to main and creates no branches. If a real run fails after the tag was created but before the release, remove the leftover tag with git push origin --delete v0.4.0.

Tried on a fork with v9.9.9-test1: dry run, real run, publish and tagged docs all worked.

Signed-off-by: Uwe Maucher <205777204+umaucher@users.noreply.github.com>

This branch has not been deployed

No deployments
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