Publish pre-built macos xcframework (#1490)

This commit is contained in:
Fangjun Kuang
2024-10-29 12:26:26 +08:00
committed by GitHub
parent 72dc68c8fa
commit 356da3b54c
3 changed files with 35 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
paths:
- './build-swift-macos.sh'
- '.github/workflows/swift.yaml'
@@ -65,6 +67,30 @@ jobs:
./build-swift-macos.sh
- name: Copy files
if: matrix.os == 'macos-13' && (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell: bash
run: |
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-macos-xcframework-static
mkdir $dst
mv -v build-swift-macos/sherpa-onnx.xcframework $dst
brew install tree
tree $dst
tar cjvf ${dst}.tar.bz2 $dst
- name: Release pre-compiled binaries and libs for macOS
if: matrix.os == 'macos-13' && (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
overwrite: true
file: sherpa-onnx-*macos-xcframework-static.tar.bz2
- name: test
shell: bash
run: |