Skip to content

refactor: make release.yml a pure reusable workflow with bump support#86

Merged
felickz merged 1 commit into
mainfrom
refactor/release-workflow
May 18, 2026
Merged

refactor: make release.yml a pure reusable workflow with bump support#86
felickz merged 1 commit into
mainfrom
refactor/release-workflow

Conversation

@felickz

@felickz felickz commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Separates self-specific release logic from the reusable workflow and adds bump input support.

release.yml (reusable workflow)

  • Removed workflow_dispatch trigger — now purely workflow_call
  • Added bump input (patch/minor/major) that auto-increments from latest GitHub release tag
  • Both version and bump are supported with clear priority:
    • version provided → use it (explicit always wins)
    • bump provided → look up latest release, increment semver
    • Both provided → warning, uses version
    • Neither → error with helpful message
  • Backwards compatible — existing callers passing version work unchanged (e.g., codeql-extractor-action)

self-release.yml

  • Added workflow_dispatch with bump choice (patch/minor/major)
  • Uses patch-release-me to bump .release.yml and opens a PR
  • Push-to-main path unchanged: reads .release.yml, passes version to reusable workflow

Caller examples

Simple bump (no .release.yml needed):

jobs:
  release:
    uses: advanced-security/reusable-workflows/.github/workflows/release.yml@main
    with:
      bump: patch

Explicit version (existing pattern):

jobs:
  release:
    uses: advanced-security/reusable-workflows/.github/workflows/release.yml@main
    with:
      version: "2.3.0"

Prerelease bump:

jobs:
  release:
    uses: advanced-security/reusable-workflows/.github/workflows/release.yml@main
    with:
      bump: minor
      prerelease: true

- Remove workflow_dispatch from release.yml (moved to self-release.yml)
- Add `bump` input (patch/minor/major) that auto-increments from the
  latest GitHub release tag
- Support both `version` (explicit) and `bump` (auto) with clear
  priority: version wins if both are set, with a warning
- Add resolve-version job that handles the logic before release
- Existing callers passing `version` continue to work unchanged

self-release.yml changes:
- Add workflow_dispatch with patch/minor/major bump choice
- Uses patch-release-me to bump .release.yml and open a PR
- Push path unchanged: reads .release.yml, passes version to reusable

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 18, 2026 17:10
@felickz felickz requested a review from a team as a code owner May 18, 2026 17:10
@felickz felickz requested a review from adrienpessu May 18, 2026 17:10
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

  • .github/workflows/release.yml

@felickz felickz merged commit bc12ebc into main May 18, 2026
6 of 7 checks passed
@felickz felickz deleted the refactor/release-workflow branch May 18, 2026 17:12
@felickz felickz removed the request for review from Copilot May 18, 2026 17:31
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.

1 participant