From 0629835df7bfcf4a491233cfa2286cdf30d0cab5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Oct 2025 14:46:34 +0000 Subject: [PATCH 1/3] Initial plan From 9afe716bac2e3aaf01ae997d9d388c0ef3f5ded7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Oct 2025 14:50:09 +0000 Subject: [PATCH 2/3] Add GitHub Actions workflow for automatic releases on semver tags Co-authored-by: phoenixofhp <64036649+phoenixofhp@users.noreply.github.com> --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d3f612c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +--- +name: Create Release + +'on': + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + name: Release ${{ github.ref_name }} + draft: false + prerelease: false + generate_release_notes: true From 081b9cdc964a303e08c54a1bb7bba23d4d093235 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Oct 2025 14:56:46 +0000 Subject: [PATCH 3/3] Add multi-platform build and release artifacts for Windows, Linux, and macOS Co-authored-by: phoenixofhp <64036649+phoenixofhp@users.noreply.github.com> --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3f612c..4a40d41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,57 @@ name: Create Release - '[0-9]+.[0-9]+.[0-9]+' jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: cmake --build build --config Release + + - name: Prepare Linux artifact + if: runner.os == 'Linux' + env: + TAG: ${{ github.ref_name }} + run: | + mkdir -p artifacts + cp build/cpp_calc artifacts/cpp_calc-linux-$TAG + chmod +x artifacts/cpp_calc-linux-$TAG + + - name: Prepare macOS artifact + if: runner.os == 'macOS' + env: + TAG: ${{ github.ref_name }} + run: | + mkdir -p artifacts + cp build/cpp_calc artifacts/cpp_calc-macos-$TAG + chmod +x artifacts/cpp_calc-macos-$TAG + + - name: Prepare Windows artifact + if: runner.os == 'Windows' + env: + TAG: ${{ github.ref_name }} + run: | + mkdir -p artifacts + copy build\Release\cpp_calc.exe ` + artifacts\cpp_calc-windows-$env:TAG.exe + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: cpp_calc-${{ runner.os }} + path: artifacts/* + release: + needs: build runs-on: ubuntu-latest permissions: contents: write @@ -15,6 +65,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + - name: Create Release uses: softprops/action-gh-release@v1 with: @@ -22,3 +77,4 @@ jobs: draft: false prerelease: false generate_release_notes: true + files: artifacts/**/*