Skip to content

Add automatic GitHub Release creation with multi-platform builds for semantic version tags#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-release-on-new-tag
Draft

Add automatic GitHub Release creation with multi-platform builds for semantic version tags#2
Copilot wants to merge 3 commits intomainfrom
copilot/add-release-on-new-tag

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 12, 2025

Overview

This PR implements automatic GitHub Release creation whenever a new semantic version tag (format x.y.z) is pushed to the repository. The workflow builds the project on multiple platforms and attaches the binaries to the release.

Changes

Added a new GitHub Actions workflow (.github/workflows/release.yml) that:

  • Triggers on push of tags matching the semantic versioning pattern (e.g., 1.0.0, 2.3.4)
  • Builds the project on Linux, macOS, and Windows using CMake
  • Creates platform-specific binaries (cpp_calc-linux-VERSION, cpp_calc-macos-VERSION, cpp_calc-windows-VERSION.exe)
  • Automatically creates a GitHub Release for the tag
  • Attaches all platform binaries to the release as downloadable assets
  • Generates release notes from commit history since the last release
  • Sets releases as public (non-draft, non-prerelease)

Usage

To create a new release, simply push a semantic version tag:

git tag 1.0.0
git push origin 1.0.0

The workflow will automatically:

  1. Detect the new tag
  2. Build the project on all three platforms (Linux, macOS, Windows)
  3. Create a GitHub Release named "Release 1.0.0"
  4. Upload the built binaries as release assets
  5. Generate release notes from commits
  6. Publish the release

Technical Details

  • Uses CMake for cross-platform builds with Release configuration
  • Build matrix includes: ubuntu-latest, macos-latest, windows-latest
  • Uses the modern softprops/action-gh-release@v1 action
  • Uses actions/upload-artifact@v4 and actions/download-artifact@v4 for artifact management
  • Tag pattern: [0-9]+.[0-9]+.[0-9]+ matches semantic versions
  • Workflow validated with yamllint to ensure proper formatting
  • Includes contents: write permission for release creation

This resolves the issue: "Я хочу чтобы при добавлении каждого нового тега в формате Semver(x.y.z) делался Release" (I want a Release to be created when adding each new tag in Semver format)

Original prompt

Я хочу чтобы при добавлении каждого нового тега в формате Semver(x.y.z) делался Release


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: phoenixofhp <64036649+phoenixofhp@users.noreply.github.com>
Copilot AI changed the title [WIP] Add release creation on new Semver tags Add automatic GitHub Release creation for semantic version tags Oct 12, 2025
Copilot AI requested a review from phoenixofhp October 12, 2025 14:50
@phoenixofhp
Copy link
Copy Markdown
Owner

@copilot
How it will builds? Can't see cmake command in workflow
I also want Windows, Linux and macOS release

…d macOS

Co-authored-by: phoenixofhp <64036649+phoenixofhp@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 12, 2025

@copilot
How it will builds? Can't see cmake command in workflow
I also want Windows, Linux and macOS release

Added build steps with CMake for all three platforms in commit 9afe716. The workflow now:

  • Builds cpp_calc on Linux, macOS, and Windows using cmake -S . -B build -DCMAKE_BUILD_TYPE=Release followed by cmake --build build --config Release
  • Creates platform-specific binaries (cpp_calc-linux-VERSION, cpp_calc-macos-VERSION, cpp_calc-windows-VERSION.exe)
  • Uploads all binaries to the GitHub Release automatically

Copilot AI changed the title Add automatic GitHub Release creation for semantic version tags Add automatic GitHub Release creation with multi-platform builds for semantic version tags Oct 12, 2025
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