File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 files : |
4747 dist/*.tar.gz
4848 dist/*.whl
49+
50+ - name : Publish search database to GitHub Release
51+ if : github.event_name == 'release'
52+ env :
53+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+ run : |
55+ SEARCH_DB=src/lucide/data/lucide-search.db
56+ if [ ! -f "$SEARCH_DB" ]; then
57+ echo "⚠️ Search database not found, skipping"
58+ exit 0
59+ fi
60+
61+ LUCIDE_VERSION=$(sqlite3 "$SEARCH_DB" "SELECT value FROM metadata WHERE key='version';")
62+ RELEASE_TAG="search-v${LUCIDE_VERSION}"
63+ echo "Publishing search DB for Lucide v${LUCIDE_VERSION} → ${RELEASE_TAG}"
64+
65+ # Create the search-data release if it doesn't already exist
66+ gh release view "$RELEASE_TAG" >/dev/null 2>&1 || \
67+ gh release create "$RELEASE_TAG" \
68+ --title "Search data for Lucide v${LUCIDE_VERSION}" \
69+ --notes "Pre-built semantic search database for Lucide icons v${LUCIDE_VERSION}. Downloaded automatically by \`python-lucide[search]\` on first use."
70+
71+ gh release upload "$RELEASE_TAG" "$SEARCH_DB" --clobber
72+ echo "✅ Uploaded search DB to release ${RELEASE_TAG}"
Original file line number Diff line number Diff line change @@ -161,10 +161,10 @@ jobs:
161161 git config --local user.name "github-actions[bot]"
162162
163163 git add src/lucide/config.py src/lucide/data/lucide-icons.db pyproject.toml .github/lucide-version.json
164- # Include search DB if it was generated
165- if [ -f src/lucide/data/lucide-search.db ]; then
166- git add src/lucide/data/lucide-search.db
167- fi
164+ # Include search artifacts if they were generated
165+ for f in src/lucide/data/lucide-search.db src/lucide/data/gemini-icon-descriptions.jsonl; do
166+ [ -f "$f" ] && git add "$f"
167+ done
168168 git commit -m "feat: Update Lucide icons to v${{ steps.version-check.outputs.latest-version }}
169169
170170 Bumps package version to ${{ steps.version-bump.outputs.new-pkg-version }}.
Original file line number Diff line number Diff line change @@ -65,9 +65,11 @@ describe:
6565 @echo " Generating icon descriptions..."
6666 $(LUCIDE_CMD ) describe --icons-db $(DB_OUTPUT_PATH ) -o $(DESCRIPTIONS_JSONL ) -v
6767
68+ CLUSTERS_JSON := src/lucide/data/lucide-icon-clusters.json
69+
6870build-search :
6971 @echo " Building search DB from descriptions..."
70- $(LUCIDE_CMD ) build-search --descriptions-file $(DESCRIPTIONS_JSONL ) -o $(SEARCH_DB_OUTPUT_PATH ) -v
72+ $(LUCIDE_CMD ) build-search --descriptions-file $(DESCRIPTIONS_JSONL ) --clusters-file $( CLUSTERS_JSON ) --icons-db $( DB_OUTPUT_PATH ) - o $(SEARCH_DB_OUTPUT_PATH ) -v
7173
7274search-data : describe build-search
7375
You can’t perform that action at this time.
0 commit comments