Skip to content

armgit / LEANN

Public Imported from GitHub
0

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

fix: release workflow to build new version before publishing

Andy Lee374db0ebb8ae
diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml
index c34f95f..6310a2f 100644
--- a/.github/workflows/release-manual.yml
+++ b/.github/workflows/release-manual.yml
@@ -65,40 +65,49 @@ jobs:
git add packages/*/pyproject.toml
git commit -m "chore: release v${{ inputs.version }}"
- - name: Get CI run ID
- id: get-ci-run
+ - name: Push version update
run: |
- # Get the latest successful CI run on the previous commit (before version bump)
- COMMIT_SHA=$(git rev-parse HEAD~1)
- RUN_ID=$(gh run list \
- --workflow="CI - Build Multi-Platform Packages" \
- --status=success \
- --commit=$COMMIT_SHA \
- --json databaseId \
- --jq '.[0].databaseId')
+ git push origin HEAD:main
+ echo "✅ Pushed version update to main branch"
+ COMMIT_SHA=$(git rev-parse HEAD)
+ echo "commit-sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
+ id: push-version
- if [ -z "$RUN_ID" ]; then
- echo "❌ No successful CI run found for commit $COMMIT_SHA"
- echo ""
- echo "This usually means:"
- echo "1. CI hasn't run on the latest commit yet"
- echo "2. CI failed on the latest commit"
- echo ""
- echo "Please ensure CI passes on main branch before releasing."
- exit 1
- fi
+ - name: Wait for CI to complete
+ id: wait-for-ci
+ run: |
+ echo "⏳ Waiting for CI to build new version..."
+ COMMIT_SHA="${{ steps.push-version.outputs.commit-sha }}"
+
+ # Wait up to 20 minutes for CI to complete
+ for i in {1..40}; do
+ RUN_ID=$(gh run list \
+ --workflow="CI - Build Multi-Platform Packages" \
+ --commit=$COMMIT_SHA \
+ --json databaseId,status \
+ --jq '.[] | select(.status == "completed") | .databaseId' | head -1)
+
+ if [ ! -z "$RUN_ID" ]; then
+ echo "✅ Found completed CI run: $RUN_ID"
+ echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
+ echo "⏳ Waiting for CI... (attempt $i/40)"
+ sleep 30
+ done
- echo "✅ Found CI run: $RUN_ID"
- echo "run-id=$RUN_ID" >> $GITHUB_OUTPUT
+ echo "❌ CI did not complete within 20 minutes"
+ exit 1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifacts from CI run
run: |
- echo "📦 Downloading artifacts from CI run ${{ steps.get-ci-run.outputs.run-id }}..."
+ echo "📦 Downloading artifacts from CI run ${{ steps.wait-for-ci.outputs.run-id }}..."
# Download all artifacts (not just wheels-*)
- gh run download ${{ steps.get-ci-run.outputs.run-id }} \
+ gh run download ${{ steps.wait-for-ci.outputs.run-id }} \
--dir ./dist-downloads
# Consolidate all wheels into packages/*/dist/