Skip to content

chore(ci): add create-release workflow#36

Merged
jja725 merged 1 commit intomainfrom
chore/release-workflow
May 2, 2026
Merged

chore(ci): add create-release workflow#36
jja725 merged 1 commit intomainfrom
chore/release-workflow

Conversation

@jja725
Copy link
Copy Markdown
Collaborator

@jja725 jja725 commented May 2, 2026

Summary

Adds a workflow_dispatch entry point that does the bump-commit-tag-push dance for releases — mirrors lance-spark's release.yml structure, adapted to Cargo.

  • .github/workflows/create-release.yml (new) — Inputs: release_type (patch/minor/major/current) × release_channel (preview/stable) × dry_run. Bumps via cargo set-version, commits as github-actions[bot], tags, pushes to main, then gh workflow run release.yml --ref <tag> to fire the existing publish job.
  • .github/workflows/release.yml — Marks -beta/-rc tags as prerelease in the GitHub Release.
  • README.md — "Releasing" rewritten: new workflow is the recommended path, manual edit/commit/tag flow kept as fallback.

Why the explicit gh workflow run

GITHUB_TOKEN-pushed refs don't trigger downstream workflows (GitHub's recursion guard). So after pushing the tag, we explicitly dispatch release.yml at the new tag's ref — workflow_dispatch events bypass the guard, and running at the tag's ref makes github.ref = refs/tags/v* so the existing publish gate passes.

Branch protection caveat

If main is a protected branch, the default GITHUB_TOKEN may be blocked from pushing. Either allow the GitHub Actions bot to bypass push restrictions, or swap GITHUB_TOKEN for a PAT (e.g. lance-spark's LANCE_RELEASE_TOKEN) in create-release.yml.

Test plan

  • Trigger Create Release with dry_run=true, release_type=current, release_channel=preview → verify the summary shows the next beta tag (e.g. v0.1.0-beta.1) and no commits/tags appear in git log.
  • Trigger Create Release with dry_run=false, release_type=patch, release_channel=preview → verify the bump commit lands on main, the tag is created, and Release workflow auto-runs and publishes a prerelease GitHub Release with the four .tar.xz artifacts.
  • Verify actionlint .github/workflows/*.yml is clean (already verified locally).

🤖 Generated with Claude Code

workflow_dispatch entry point that bumps Cargo.toml via cargo set-version,
commits, tags, pushes to main, and dispatches release.yml at the new tag.
Mirrors lance-spark's release.yml (release_type x release_channel x dry_run
inputs); preview channel auto-increments beta numbers.

Direct tag push by GITHUB_TOKEN does not trigger downstream workflows
(GitHub recursion guard), so the workflow uses 'gh workflow run' against
the new tag's ref so release.yml's publish job (gated on refs/tags/v*)
fires.

Also: release.yml marks -beta/-rc tags as prerelease, and the README
'Releasing' section is rewritten with the workflow as the recommended
path and the manual edit/commit/tag flow kept as a fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jja725 jja725 merged commit eb974bd into main May 2, 2026
7 checks passed
@jja725 jja725 deleted the chore/release-workflow branch May 2, 2026 05:35
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