mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-06 11:52:57 +00:00
## Summary - Created custom GitHub Action that creates issues when workflow jobs fail - Added report-failure jobs to cargo-publish.yml, java-publish.yml, npm-publish.yml, and pypi-publish.yml - Issues are created automatically with workflow name, failed job names, and run URL ## Test plan - Workflows will only create issues on actual release or workflow_dispatch events - Can be tested by triggering workflow_dispatch on a publish workflow Based on lancedb/lance#4873 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Cargo Publish
|
|
|
|
on:
|
|
push:
|
|
tags-ignore:
|
|
# We don't publish pre-releases for Rust. Crates.io is just a source
|
|
# distribution, so we don't need to publish pre-releases.
|
|
- "v*-beta*"
|
|
- "*-v*" # for example, python-vX.Y.Z
|
|
|
|
env:
|
|
# This env var is used by Swatinem/rust-cache@v2 for the cache
|
|
# key, so we set it to make sure it is always consistent.
|
|
CARGO_TERM_COLOR: always
|
|
# Up-to-date compilers needed for fp16kernels.
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
id-token: write
|
|
timeout-minutes: 30
|
|
# Only runs on tags that matches the make-release action
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: rust
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler libssl-dev
|
|
- uses: rust-lang/crates-io-auth-action@v1
|
|
id: auth
|
|
- name: Publish the package
|
|
run: |
|
|
cargo publish -p lancedb --all-features --token ${{ steps.auth.outputs.token }}
|
|
report-failure:
|
|
name: Report Workflow Failure
|
|
runs-on: ubuntu-latest
|
|
needs: [build]
|
|
if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/create-failure-issue
|
|
with:
|
|
job-results: ${{ toJSON(needs) }}
|
|
workflow-name: ${{ github.workflow }}
|