name: CI on: push: branches: - main tags: - 'v*' pull_request: jobs: ci: name: CI # `astral-uv` is a self-hosted runner with uv pre-installed, so we can # skip the setup-uv step entirely. pyproject.toml's # [tool.hatch.build.hooks.jupyter-builder] handles jlpm install + # jlpm build:prod before wheel assembly. runs-on: astral-uv steps: - name: Checkout uses: actions/checkout@v4 - name: Build package run: uv build - name: Upload wheel artifacts if: success() uses: actions/upload-artifact@v4 with: name: snapshot-dist path: dist/snapshot-* if-no-files-found: error # Only create a release + attach dist/ assets when pushing a v* tag. # On branch pushes / pull requests this step is skipped entirely. - name: Upload release assets via Gitea API if: startsWith(github.ref, 'refs/tags/v') env: GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail TAG_NAME="${{ github.ref_name }}" echo "Creating Gitea release for tag ${TAG_NAME}..." RELEASE_RESPONSE=$(curl -fsS -X POST "${{ github.api_url }}/repos/${{ github.repository }}/releases" \ -H "accept: application/json" \ -H "authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ -d "$(cat <