add build and release workflows
This commit is contained in:
32
.github/workflows/build.yml
vendored
Normal file
32
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Build
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
arm64_ventura:
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- run: |
|
||||
brew fetch --force --bottle-tag=arm64_ventura sdl2
|
||||
brew install $(brew --cache --bottle-tag=arm64_ventura sdl2)
|
||||
sudo mkdir -p /opt/homebrew/lib
|
||||
sudo ln -s /usr/local/lib/libSDL2.a /opt/homebrew/lib/libSDL2.a
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: cheetah
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ggerganov/whisper.cpp
|
||||
ref: v1.3.0
|
||||
path: whisper.cpp
|
||||
- run: |
|
||||
cd cheetah
|
||||
xcodebuild -scheme Cheetah -configuration Release -destination generic/platform=macOS -derivedDataPath build
|
||||
cd build/Build/Products/Release
|
||||
zip -r Cheetah.zip Cheetah.app
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Cheetah
|
||||
path: cheetah/build/Build/Products/Release/Cheetah.zip
|
||||
32
.github/workflows/release.yml
vendored
Normal file
32
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*'
|
||||
- 'v*.*.*'
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build.yml
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: Cheetah
|
||||
- uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: true
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./Cheetah.zip
|
||||
asset_name: Cheetah.zip
|
||||
asset_content_type: application/zip
|
||||
Reference in New Issue
Block a user