Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,25 @@ jobs:
- linux
uses: ./.github/workflows/dotnet-maui.yml
secrets: inherit

upload-build-artifacts:
needs:
- android
- macos
- windows
- wasm
- linux
- windows-vulkan
- linux-vulkan
- windows-openvino
- linux-openvino
- windows-no-avx
- linux-no-avx
if: >
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
(github.ref == 'refs/heads/main')
permissions:
contents: write
uses: ./.github/workflows/upload-build-artifacts.yml
secrets: inherit

54 changes: 54 additions & 0 deletions .github/workflows/upload-build-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Upload Build Artifacts

permissions:
contents: write

on:
workflow_call:

jobs:
upload-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check for existing release with same commit
id: check-release
run: |
COMMIT=${{ steps.release-info.outputs.commit }}
if gh release list --limit 100 --json tagName --jq ".[] | select(.tagName | contains(\"${COMMIT}\"))"; then
echo "release_exists=true" >> "$GITHUB_OUTPUT"
else
echo "release_exists=false" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ github.token }}

- name: Download Artifacts
if: steps.check-release.outputs.release_exists != 'true'
id: download-artifact
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: runtime-artifacts

- name: Zip Artifacts
if: steps.check-release.outputs.release_exists != 'true'
run: |
zip -r native-runtimes.zip runtime-artifacts

- name: Set release info
id: release-info
run: |
echo "date=$(date -u +'%Y%m%d-%H%M')" >> "$GITHUB_OUTPUT"
echo "commit=$(git -C whisper.cpp rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Create preview release
if: steps.check-release.outputs.release_exists != 'true'
uses: ncipollo/release-action@90dc22b77f7e5e8d3a3a92924b18415dca53f445
with:
tag: preview-${{ steps.release-info.outputs.date }}-${{ steps.release-info.outputs.commit }}
name: Preview ${{ steps.release-info.outputs.date }} (${{ steps.release-info.outputs.commit }})
artifacts: native-runtimes.zip
prerelease: true

Loading