Skip to content

Split CI/CD pipeline: Build CI and automated release workflow with version management#128

Merged
MaksyKun merged 6 commits intodevfrom
copilot/enhance-pipeline-for-versioning
Nov 16, 2025
Merged

Split CI/CD pipeline: Build CI and automated release workflow with version management#128
MaksyKun merged 6 commits intodevfrom
copilot/enhance-pipeline-for-versioning

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 16, 2025

The build pipeline creates semantic versioned releases but was building artifacts with hardcoded 1.0.0-SNAPSHOT version, resulting in mismatched artifact names. Additionally, the pipeline needed to be split into separate build and release workflows for better efficiency.

Changes

Split into two separate workflows:

1. Build CI Workflow (.github/workflows/build-ci.yml) - NEW

  • Triggers on every push or PR when src/** files change
  • Runs Maven build and tests
  • Provides fast CI feedback without release overhead
  • Read-only permissions

2. Release Workflow (.github/workflows/release.yml) - NEW

  • Triggers only when PRs to dev or main branches are merged
  • Computes semantic version based on target branch
  • Updates pom.xml via Maven Versions Plugin: mvn versions:set -DnewVersion=X.X.X
  • Updates plugin.yml via sed: s/^version: .*/version: X.X.X/
  • Commits version changes to base branch (dev or main)
  • Builds versioned artifact
  • Creates GitHub release with tag

Versioning rules:

  • Merged PRs to dev: patch bump (v0.0.0 → v0.0.1)
  • Merged PRs to main: minor bump (v0.0.1 → v0.1.0)

Removed:

  • .github/workflows/build.yml - Replaced by the two specialized workflows above

Result

  • Artifacts now correctly named as QuickStocks-X.X.X.jar matching release tags
  • Version changes tracked in git history via automated bot commits
  • Efficient CI that only runs on source code changes
  • Separated build validation from release management
  • Fast developer feedback without waiting for release steps

Documentation

  • Documentation/PIPELINE_VERSIONING.md - Split workflow architecture and versioning system reference
  • Documentation/PIPELINE_WORKFLOW_DIAGRAM.md - Visual diagrams for both workflows
  • Documentation/PIPELINE_VERSIONING_IMPLEMENTATION.md - Implementation details

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Pipeline enhancement</issue_title>
<issue_description>I created a build pipeline to use semantic versioning and create tag + release out of the plugin.
Please improve it to automatically commit a version update into maven too so that the Plugin gets in dev/main into "QuickStocks-X,X,X" </issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>Pipeline enhancement</issue_title>
<issue_description>I created a build pipeline to use semantic versioning and create tag + release out of the plugin.
Please improve it to automatically commit a version update into maven too so that the Plugin gets in dev/main into "QuickStocks-X,X,X" </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 16, 2025 22:24
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
@MaksyKun
Copy link
Copy Markdown
Contributor

@copilot There are two more things I need to optimize:

  • Dont make the trigger required here because it makes no sense. Instead, maybe we should split the pipelines

    • A build pipeline should always run when a commit is done regardless of the branch
    • Another pipeline for release will only be triggered, when changes of a pull request from feature -> dev branch or dev -> main branch will be done
  • In generall, the build pipeline should only be triggered when changes are made inside of /src

Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve build pipeline for version updates in Maven Automate Maven version updates in release pipeline Nov 16, 2025
Copilot AI requested a review from MaksyKun November 16, 2025 22:31
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot There are two more things I need to optimize:

  • Dont make the trigger required here because it makes no sense. Instead, maybe we should split the pipelines
    • A build pipeline should alway...

Done! Split the pipeline as requested:

Build CI Workflow (.github/workflows/build-ci.yml):

  • Runs on every push/PR
  • Only triggers when src/** files change
  • Performs Maven build and tests
  • No releases or version updates

Release Workflow (.github/workflows/release.yml):

  • Triggers only when PRs to dev/main are merged
  • Updates versions, builds, and creates releases
  • Uses semantic versioning (dev=patch, main=minor)

Commit: a5bf32b

Copilot AI changed the title Automate Maven version updates in release pipeline Split CI/CD pipeline: Build CI and automated release workflow with version management Nov 16, 2025
@MaksyKun MaksyKun marked this pull request as ready for review November 16, 2025 22:54
@MaksyKun MaksyKun merged commit 83a3f6c into dev Nov 16, 2025
@MaksyKun MaksyKun deleted the copilot/enhance-pipeline-for-versioning branch November 17, 2025 08:08
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.

Pipeline enhancement

2 participants