mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[IMPROVEMENT]: Add macOS binary to GitHub Releases (#2274)
* ci: upload macOS binary to GitHub release on publish * ci: version macOS release artifact as ccextractor-<version>-macos
This commit is contained in:
committed by
GitHub
parent
9440749cbe
commit
576c727af8
24
.github/workflows/build_mac.yml
vendored
24
.github/workflows/build_mac.yml
vendored
@@ -25,6 +25,8 @@ on:
|
||||
- 'mac/**'
|
||||
- 'package_creators/**'
|
||||
- 'src/rust/**'
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build_shell:
|
||||
runs-on: macos-latest
|
||||
@@ -40,12 +42,30 @@ 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/${{ steps.version.outputs.filename }}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user