Skip to content

ci: automate pre- and post-release version bump to include -DEV in main #3583 #3586

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

Closed

Conversation

asr-alurisanthoshreddy
Copy link

Fixes # (#3583)


Problem

Currently, after a release, the main branch version remains the same as the last release (e.g., 1.22.0).
This creates ambiguity over whether a build from main is:

  • A released version, or
  • A development build with unreleased changes.

Changes

Proposed Solution

Automate the post-release version bump so that the main branch always reflects a development build with a -DEV suffix.

Implementation

  1. New Pre-Release Workflow (.github/workflows/pre-release.yml)

    • Triggered manually before a release.
    • Removes the -DEV suffix from include/opentelemetry/version.h.
    • Commits the clean version to main.
    • Creates and pushes a version tag (vX.Y.Z).
  2. New Post-Release Workflow (.github/workflows/post-release.yml)

    • Triggered automatically when a tag (vX.Y.Z) is pushed.
    • Calculates the next minor version.
    • Updates include/opentelemetry/version.h to that next version with a -DEV suffix.
    • Commits and pushes the change to main.
  3. version.h Update
    Example after release of 1.22.0 → bumped to:

    // Development version after 1.22.0 release
    #define OPENTELEMETRY_VERSION "1.23.0-DEV"
    #define OPENTELEMETRY_VERSION_MAJOR 1
    #define OPENTELEMETRY_VERSION_MINOR 23
    #define OPENTELEMETRY_VERSION_PATCH 0

Benefits

  • Clear separation between released versions and development builds.
  • Fully automated — no manual bump required after release.
  • Reduces the risk of human error in the versioning process.

Files Added:

  • .github/workflows/pre-release.yml
  • .github/workflows/post-release.yml

Files Updated:

  • include/opentelemetry/version.h

Checklist:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@asr-alurisanthoshreddy asr-alurisanthoshreddy requested a review from a team as a code owner August 11, 2025 15:49
Copy link

linux-foundation-easycla bot commented Aug 11, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Aug 11, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 49cf1ff
🔍 Latest deploy log https://app.netlify.com/projects/opentelemetry-cpp-api-docs/deploys/689ad86158adfd0008618879

@lalitb lalitb requested a review from Copilot August 11, 2025 19:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR automates the pre- and post-release version management process to ensure the main branch always contains a development version with a -DEV suffix, providing clear distinction between released and development builds.

  • Adds a manual pre-release workflow that removes -DEV suffix and creates release tags
  • Adds an automated post-release workflow that bumps to the next development version
  • Updates the current version from 1.22.0 to 1.23.0-DEV to demonstrate the new format

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
api/include/opentelemetry/version.h Updates version from 1.22.0 to 1.23.0-DEV with explanatory comment
.github/workflows/pre-release.yml Manual workflow to prepare clean release versions and create tags
.github/workflows/post-release-bump.yml Automated workflow to bump version to next development build after releases

asr-alurisanthoshreddy and others added 7 commits August 11, 2025 13:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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