Skip to content

test gh deploy 2

test gh deploy 2 #3

Workflow file for this run

on:
push:
tags:
- *

Check failure on line 4 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
#should we prevent main branch build?
#branches:
# - "r2.9.2"
jobs:
#generated by gemini
create_release_tag:
runs-on: ubuntu-latest
permissions:
contents: write
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the default GITHUB_TOKEN
run: |
TAG=${GITHUB_REF#refs/tags/} # Extract the tag name from the ref
gh release create "$TAG" \
--draft \
--title "Release $TAG" \
--notes "Automated release for $TAG." \
--generate-notes # Automatically generate release notes based on commits
echo "Release $TAG created successfully."
build:
needs: create_release_tag
strategy:
# also support macos, linux arm64
matrix:
os: [ubuntu-24.04]
#os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14]
runs-on: ${{matrix.os}}
# handle the fact we only want to build/name on tags
steps:
- name: Checkout repository
uses: actions/checkout@v5
# TODO: use specific submodules for platform
with:
submodules: true
- name: build ${{ runner.os }} ${{ runner.arch }}
# TODO: make sure each part is built with the proper concurrency
#echo "RUNNER OS" "$RUNNER_OS" "${{ runner.os }}" "$RUNNER_ARCH" "${{ runner.arch }}"
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
bash ./scripts/build_docker_manylinux_2_28.sh test_tag;
elif [ "$RUNNER_OS" == "macOS" ]; then
bash ./scripts/build_macos.sh test_tag;
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Upload Release Asset ${{ runner.os }} ${{ runner.arch }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=${GITHUB_REF#refs/tags/}
gh release upload "$TAG" dist/*.whl
echo "Asset uploaded to release $TAG."