Skip to content

Automate versioning and releases with semantic versioning and manual trigger support#131

Merged
ghandic merged 10 commits into
mainfrom
copilot/improve-ci-pipeline-versioning
Jan 14, 2026
Merged

Automate versioning and releases with semantic versioning and manual trigger support#131
ghandic merged 10 commits into
mainfrom
copilot/improve-ci-pipeline-versioning

Conversation

Copilot AI commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Manual version management and release creation slows down the CI pipeline. This implements automated semantic versioning triggered on merge to main, with additional support for manual release triggering with maintainer-controlled versioning.

Changes

Automated Release Workflow

  • Analyzes commits since last tag using conventional commit patterns
  • Determines version bump: feat: → minor, fix: → patch, BREAKING CHANGE:/feat!: → major
  • Non-conventional commits default to patch (ensures every merge releases)
  • Updates jsf/BUILD version, commits with [skip ci], creates GitHub release with changelog
  • Triggers existing PyPI publish and docs deployment workflows

Manual Release Trigger

  • Added workflow_dispatch trigger for manual release creation
  • Maintainers can specify exact version (e.g., 1.2.3) or select bump type (major, minor, patch, auto)
  • Perfect for accepting PRs on mobile and then triggering releases with chosen versions
  • Version format validation (X.Y.Z) with regression warnings
  • Maintainer controls the version, not the PR author

Python Version Matrix

  • Extended from 3.8-3.11 to 3.8-3.14
  • Added [skip ci] condition to prevent redundant builds on version bumps

Documentation

  • Release process guide with conventional commit examples and manual release instructions
  • Updated contributing guidelines
  • Workflow README for maintainers

Implementation Details

Version bump logic with validation:

# Extract and validate X.Y.Z format
CURRENT_VERSION=$(grep -o 'version="[^"]*"' jsf/BUILD | cut -d'"' -f2)

# Analyze commits with pattern matching
BREAKING_PATTERN="^(feat|fix|chore|docs|style|refactor|perf|test)(\(.+\))?!:"
FEAT_PATTERN="^feat(\(.+\))?:"

# Update with escaped sed
ESCAPED_CURRENT=$(echo "$CURRENT_VERSION" | sed 's/\./\\./g')
sed -i.bak "s/version=\"${ESCAPED_CURRENT}\"/version=\"${NEW_VERSION}\"/" jsf/BUILD

Manual version input with validation:

# If manual version specified, validate and use it
if [ -n "$MANUAL_VERSION" ]; then
  # Validate X.Y.Z format
  # Compare with current version and warn on regression
  # Allow intentional downgrades for hotfixes
fi

Portable grep patterns (no -P flag), version format validation, proper escaping in sed, comprehensive error handling throughout.

Mobile Workflow

  1. Accept PR on GitHub mobile app
  2. Navigate to Actions → "Automated Release" workflow
  3. Tap "Run workflow"
  4. Enter desired version or select bump type
  5. Tap "Run workflow" to create release

The workflow handles version updates, commits, and triggers PyPI/docs deployment automatically.

Original prompt

Make the versioning have a better dx for the ci pipeline, so it's more automated with creating a new release after merge to main


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 13, 2026 11:15
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance versioning for automated release process Automate versioning and releases on merge to main with semantic versioning Jan 13, 2026
Copilot AI requested a review from ghandic January 13, 2026 11:24
Removed Python version 3.14 from the CI matrix.

Signed-off-by: Andy Challis <andrewchallis@hotmail.co.uk>
@ghandic

ghandic commented Jan 14, 2026

Copy link
Copy Markdown
Owner

@copilot I just want to be able to accept a PR on mobile and then run a release but I need to determine the release version not the person raising the PR

Copilot AI and others added 2 commits January 14, 2026 22:06
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>
Co-authored-by: ghandic <23500353+ghandic@users.noreply.github.com>

Copilot AI commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I just want to be able to accept a PR on mobile and then run a release but I need to determine the release version not the person raising the PR

Added manual release trigger! You can now:

  1. Accept PR on mobile
  2. Go to Actions → "Automated Release" → "Run workflow"
  3. Enter your chosen version (e.g., 1.2.3) or select bump type

The workflow now supports workflow_dispatch with two inputs:

  • version: Specify exact version (e.g., 1.2.3)
  • bump_type: Choose major, minor, patch, or auto

Changes in commit 48a7c3f:

  • Manual version input with X.Y.Z validation
  • Version regression warning (allows intentional downgrades for hotfixes)
  • Updated docs with mobile workflow instructions

You control the version, not the PR author. ✅

Copilot AI changed the title Automate versioning and releases on merge to main with semantic versioning Automate versioning and releases with semantic versioning and manual trigger support Jan 14, 2026
Signed-off-by: Andy Challis <andrewchallis@hotmail.co.uk>
Signed-off-by: Andy Challis <andrewchallis@hotmail.co.uk>
@ghandic ghandic marked this pull request as ready for review January 14, 2026 22:16
@ghandic ghandic merged commit 722823f into main Jan 14, 2026
4 checks passed
@ghandic ghandic deleted the copilot/improve-ci-pipeline-versioning branch January 14, 2026 22: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.

2 participants