Skip to content

Commit

Permalink
Add macOS ARM build
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Apr 3, 2024
1 parent 4864a6b commit 670544c
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
files: subconverter_aarch64.tar.gz
draft: true

macos_build:
name: macOS Build
runs-on: macos-latest
macos_x86_build:
name: macOS x86 Build
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -140,6 +140,34 @@ jobs:
files: subconverter_darwin64.tar.gz
draft: true

macos_arm_build:
name: macOS ARM Build
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i -e 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build
run: bash scripts/build.macos.release.sh
- name: Upload
uses: actions/upload-artifact@v3
with:
name: subconverter_darwinarm
path: subconverter/
- name: Package Release
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
run: tar czf subconverter_darwinarm.tar.gz subconverter
- name: Draft Release
uses: softprops/action-gh-release@v1
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
with:
files: subconverter_darwinarm.tar.gz
draft: true

windows64_build:
name: Windows x86_64 Build
runs-on: windows-latest
Expand Down

0 comments on commit 670544c

Please sign in to comment.