Skip to content

ci: create the GitHub release in the workflow - #140

Merged
uniqueg merged 3 commits into
devfrom
ci/139-publish-release
Nov 9, 2026
Merged

uniqueg merged 3 commits into
devfrom
ci/139-publish-release

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

The release workflow now creates the GitHub release of a version tag itself, with the shared action elixir-cloud-aai/.github/actions/publish-release (v1.1.0, pinned by commit):

  • prepare gets the step "Check release notes": the action in check-only mode validates docs/releases/<version>.md, that the tag exists and points to the release commit, the previous tag, and that no published release exists yet.
  • The image job is renamed publish → release-image ("Release image"), so job names stay unique.
  • The new job publish ("Publish release") runs after release-image. It creates the release from the curated notes followed by GitHub's generated notes (the organisation's release notes format), as a pre-release for rc versions and below 1.0, and sets latest by version.
  • docs/releases/1.2.0.md holds the curated notes of 1.2.0. mkdocs.yml excludes releases/ from the docs site.
  • docs/development.md describes the new step: delete leftover draft releases before tagging, re-run only failed jobs, and Pubgrade doesn't wait for the release.

Closes #139

Verification

  • mkdocs build --strict: passes.
  • The action's own tests (44 unit tests) pass in elixir-cloud-aai/.github.
  • Reviewed with the adversarial and quality reviewer subagents before the push; their findings are fixed.
  • CI: passes (Lint, Test, Docs, Smoke test, Scan image, CodeQL, Codecov, CI passed).

The workflow steps can only run on a real tag. A fork dry run should confirm that the release is created after "Release image", with the curated notes, ## Commits and the Full Changelog line.

Declined review findings

  • Sourcery (medium): with the shared concurrency group of publish, a waiting run can be cancelled if three or more tags are released at once. The group stays: GitHub has no queue for concurrency groups, and without the group latest could be set out of order (release-image uses the same pattern). The case can be recovered by re-running the cancelled job, which is now documented (b903eda).

🤖 Generated with Claude Code

Add the job publish ("Publish release") at the end of the release
workflow: once the image is published, it creates the GitHub release
of the tag with the shared action publish-release of
elixir-cloud-aai/.github: the curated notes of docs/releases/, then
GitHub's generated notes, the Full Changelog line last; a pre-release
below 1.0.0 and for a/b/rc versions. Only this job gets contents: write.
prepare checks the notes, the tag and existing releases with the same
action first, so that nothing is published if they are missing or
malformed.

The image job is renamed to release-image ("Release image") to free
the ID and name, as in FOCA. Add the curated notes of 1.2.0, keep
docs/releases/ out of the docs site, and describe the step in the
release docs.

Closes #139

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Validate the curated notes, tag provenance, and existing releases during preparation, then create the GitHub release after the image is published with retry-safe behavior.

  • .github/workflows/release.yml L127-135, L329-359

Rename the image-publishing job and update its workflow references so image release precedes GitHub release while Pubgrade notification remains independent.

  • .github/workflows/release.yml L3-30 (+6 small edits)

Documentation

Document the curated release-note requirements, automatic GitHub release behavior, retry and draft guidance, and independent Pubgrade notification.

  • docs/development.md L127, L140-152, L161-180
  • docs/releases/1.2.0.md L1-54

Keep curated release notes out of the published MkDocs site.

  • mkdocs.yml L16-19

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Add the Maintenance entry for the GitHub release that the release
workflow now creates (#139, #140).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.91%. Comparing base (2acda86) to head (b903eda).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #140   +/-   ##
=======================================
  Coverage   66.91%   66.91%           
=======================================
  Files          67       67           
  Lines        2699     2699           
  Branches      288      288           
=======================================
  Hits         1806     1806           
  Misses        746      746           
  Partials      147      147           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 9, 2026 15:08

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".github/workflows/release.yml" line_range="341" />
<code_context>
+    needs: [prepare, release-image]
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    concurrency:
+      group: ${{ github.workflow }}-publish-release
+      cancel-in-progress: false
</code_context>
<issue_to_address>
**Published images lack GitHub releases**

When one `publish` job is running and two or more later releases reach the shared concurrency group, gitHub keeps only one pending job per concurrency group, so a newer run cancels the older pending `publish` job after `release-image` has published its image; no GitHub release is created unless someone reruns the canceled job.

Replace the shared concurrency group with a queue that retains every pending publish run.

Also at `.github/workflows/release.yml:342-343`.
</issue_to_address>

Linked issues

#139 ci: create the GitHub release in the release workflow · 5 of 5 met

# Requirement Status Notes
1 Add a publish job after the image is published, with contents: write on that job only. ✅ Met The publish job is named “Publish release,” needs release-image, and grants contents: write only to that job.
2 Create the release body from curated notes followed by GitHub's generated notes under ## Commits, with the **Full Changelog** line last. ✅ Met The job invokes the shared publish-release action with the tagged version's curated notes and commit; the workflow documentation describes the required generated-notes format.
3 Make versions below 1.0.0 pre-releases, so 1.2.0 is a full release. ✅ Met The workflow documentation states that versions below 1.0.0 are pre-releases; 1.2.0 is above that threshold.
4 prepare must fail before anything is published if the tagged version's curated notes are missing or malformed. ✅ Met prepare runs the shared action in check-only mode with the version-specific notes path and tagged commit before the publishing jobs.
5 Add curated notes for 1.2.0 and describe the new release step in the release documentation. ✅ Met docs/releases/1.2.0.md is added, and docs/development.md describes the GitHub release step.

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and if the release action creates a release with incorrect notes or metadata, that release is publicly visible and reverting the workflow will not retract it. The release can be corrected or removed separately, but any exposure or reliance before then cannot be undone by the revert.

Blocking findings: .github/workflows/release.yml:341


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/release.yml Resolved
Publish release runs one release at a time, so GitHub keeps only one
waiting run per concurrency group and can cancel an older one when
several tags are released at once. Say so in the workflow and the
development guide, with the remedy (re-run the failed jobs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg merged commit 7150d95 into dev Nov 9, 2026
27 of 34 checks passed
@uniqueg
uniqueg deleted the ci/139-publish-release branch November 9, 2026 15:18
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.

ci: create the GitHub release in the release workflow

1 participant