From 1bf24dacc720d8622c450348c6ecc56132738fa2 Mon Sep 17 00:00:00 2001 From: Chandragupt Singh Date: Fri, 29 May 2026 21:31:49 +0530 Subject: [PATCH 1/2] ci: upload macOS binary to GitHub release on publish --- .github/workflows/build_mac.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index a42ec3ca2..754dfcb46 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -25,6 +25,8 @@ on: - 'mac/**' - 'package_creators/**' - 'src/rust/**' + release: + types: [published] jobs: build_shell: runs-on: macos-latest @@ -46,6 +48,13 @@ jobs: with: name: CCExtractor mac build path: ./mac/artifacts + - name: Upload macOS binary to Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v3 + with: + files: ./mac/artifacts/ccextractor + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_shell_system_libs: # Test building with system libraries via pkg-config (for Homebrew formula compatibility) runs-on: macos-latest From c04662778f838859e8061a39b67a679be29d00ff Mon Sep 17 00:00:00 2001 From: Chandragupt Singh Date: Sat, 30 May 2026 19:54:05 +0530 Subject: [PATCH 2/2] ci: version macOS release artifact as ccextractor--macos --- .github/workflows/build_mac.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 754dfcb46..c7f56f1b3 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -42,17 +42,28 @@ jobs: working-directory: ./mac - name: Prepare artifacts run: mkdir ./mac/artifacts + - name: Get version + id: version + run: | + if [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" + VERSION="${VERSION#v}" + else + VERSION=$(sed -n 's/#define VERSION "//;s/"//p' src/lib_ccx/lib_ccx.h 2>/dev/null | head -1 || echo "dev") + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "filename=ccextractor-${VERSION}-macos" >> "$GITHUB_OUTPUT" - name: Copy release artifact - run: cp ./mac/ccextractor ./mac/artifacts/ + run: cp ./mac/ccextractor ./mac/artifacts/${{ steps.version.outputs.filename }} - uses: actions/upload-artifact@v7 with: name: CCExtractor mac build - path: ./mac/artifacts + path: ./mac/artifacts/${{ steps.version.outputs.filename }} - name: Upload macOS binary to Release if: github.event_name == 'release' uses: softprops/action-gh-release@v3 with: - files: ./mac/artifacts/ccextractor + files: ./mac/artifacts/${{ steps.version.outputs.filename }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build_shell_system_libs: