Fix uploading #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build: | |
runs-on: ${{ fromJson('{"linux":"ubuntu-22.04","mac":"macos-14","win":"windows-2022"}')[matrix.os] }} | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [linux, mac] | |
arch: [x64] | |
include: | |
- os: mac | |
arch: arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Use ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: 20241030-${{ matrix.os }} | |
- name: Bootstrap | |
run: npx zx bootstrap.mjs --verbose | |
- name: Build | |
run: npx zx build.mjs --target-arch ${{ matrix.arch }} | |
- name: Export | |
run: npx zx export.mjs | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executorch-${{ matrix.os }}-${{ matrix.arch }} | |
path: executorch-${{ matrix.os }}-${{ matrix.arch }}-*.zip | |
retention-days: 1 | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [build] | |
runs-on: ubuntu-latest | |
permissions: | |
# Needed by action-gh-release. | |
contents: write | |
steps: | |
- name: Download Files | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
name: ExecuTorch ${{ github.ref_name }} | |
body: '## Changelog' | |
files: '*.zip' |