8000 feat: Update release version by rossnelson · Pull Request #2762 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Update release version #2762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 11, 2025
Merged

Conversation

rossnelson
Copy link
Collaborator
@rossnelson rossnelson commented Jun 9, 2025

Motivation

Previously, releases could be published without proper version increments in the codebase, leading to inconsistencies between release tags and actual code versions. We needed a way to enforce that version bumps happen before releases, ensuring every release reflects an actual version increase in the code.

Solution

Enforce Version Bump Workflow: Added a mandatory version bump step that must happen before any release can be created. The workflow analyzes commits or accepts manual input to properly increment versions in both package.json and server/server/version/version.go.

Block Releases Until Version Increases: Modified release workflows to validate that the current version is actually newer than the last released version (comparing against git tags, not commits). Draft releases and published releases are now blocked until this validation passes.

Single Source of Truth: Uses Go's UIVersion constant as the authoritative version source, ensuring all validation logic is consistent and package.json stays in sync.

Benefits

  • Prevents version inconsistencies: No more releases with incorrect or unchanged version numbers
  • Enforces proper workflow: Version bump → Draft creation → Release publication
  • Allows flexibility: Supports automatic version calculation, manual specification, or exact version overrides
  • Robust validation: Compares against actual released versions, handles multiple commits between version bump and release

Usage

Maintainers now run Actions → "Version Bump" before creating releases, which creates a PR with proper version increments. Only after this PR is merged will the automated release workflows proceed with draft and final release creation.

This ensures every release represents a genuine version progression and maintains consistency between code and release artifacts.

combined.mov

- Move UIVersion to var so it can be set using ldflags.
- Add a release step that opens a pr with an update that sets the
  default value of the var to the new version.
@rossnelson rossnelson requested a review from a team as a code owner June 9, 2025 16:58
@rossnelson rossnelson requested review from GiantRobots and removed request for a team June 9, 2025 16:58
Copy link
vercel bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 5:11pm

@rossnelson rossnelson marked this pull request as ready for review June 9, 2025 18:52
@rossnelson rossnelson requested a review from Alex-Tideman June 9, 2025 20:00
This commit introduces automated workflows for managing application versions and releases:

- Version Bump workflow to update package.json and version.go
- Release Draft workflow to create drafts when versions increase
- Release Published workflow to build/package releases

Other changes:
- Add version validation script
- Update README with release process details
- Add workflow documentation
  - Add 8 new custom GitHub Actions for reusable workflow components
  - Refactor version-bump.yml to use custom actions and Peter Evans create-pull-request
  - Add specific version input capability to version-bump workflow
  - Update release-draft.yml to use version validation custom action
  - Simplify release-published.yml with validation and build custom actions
  - Update version validation to compare against git tags instead of last commit
  - Remove unnecessary Node.js setup from version-bump workflow

  Custom actions added:
  - analyze-version-bump-type: Analyze commits for semantic version bumping
  - build-and-package: Build and package UI for releases
  - calculate-version-bump: Calculate new versions with override support
  - update-version-files: Atomically update package.json and version.go
  - update-version-from-release: Update version files from release tags
  - validate-published-release: Validate release versions match codebase
  - validate-release-readiness: Validate version sync and increases
  - validate-version-sync: Check package.json and version.go alignment

  This reduces workflow complexity from 274 lines to reusable components
  while adding robust version validation and specific version override capability.
@rossnelson rossnelson marked this pull request as ready for review June 11, 2025 15:13
@rossnelson rossnelson merged commit a11c044 into main Jun 11, 2025
16 checks passed
@rossnelson rossnelson deleted the DT-3014-add-version-var-update branch June 11, 2025 18:29
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
0