Skip to content

Commit 6f055d1

Browse files
committed
Add Release CI
1 parent 17ef1a3 commit 6f055d1

File tree

3 files changed

+79
-4
lines changed

3 files changed

+79
-4
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Langchain Release
2+
on:
3+
workflow_dispatch: {}
4+
push:
5+
tags:
6+
- "langchain-*"
7+
8+
concurrency:
9+
group: release-${{ github.workflow }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
permissions: write-all
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.ref }}
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
with:
24+
enable-cache: true
25+
cache-dependency-glob: "langchain/uv.lock"
26+
27+
- name: Build
28+
run: |
29+
cd langchain
30+
uv sync --dev
31+
uv build
32+
33+
- name: Publish package to Pypi
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
packages-dir: langchain/dist
37+
38+
- name: Create GitHub Release
39+
uses: ncipollo/release-action@v1
40+
with:
41+
artifacts: "langchain/dist/*.whl"
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
prerelease: false

langchain/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name = "langchain-vectorize"
33
version = "0.0.1"
44
description = "An integration package connecting Vectorize and LangChain"
55
readme = "README.md"
6-
keywords = ["langchain"]
6+
keywords = ["langchain", "vectorize", "retrieval", "search"]
77
authors = [
8-
{ name = "Christophe Bornet", email = "[email protected]" },
8+
{ name = "Vectorize", email = "Vectorize <[email protected]>" },
99
]
1010
requires-python = ">=3.9"
1111
dependencies = [
@@ -26,8 +26,8 @@ classifiers = [
2626
license = "MIT"
2727

2828
[project.urls]
29-
Repository = "https://github.com/vectorize-io/langchain-vectorize.git"
30-
Issues = "https://github.com/vectorize-io/langchain-vectorize/issues"
29+
Repository = "https://github.com/vectorize-io/integrations-python.git"
30+
Issues = "https://github.com/vectorize-io/integrations-python/issues"
3131

3232
[dependency-groups]
3333
dev = [

release.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -e
4+
package=$1
5+
version=$2
6+
7+
if [[ -z "$package" || -z "$version" ]]; then
8+
echo "Usage: release.sh <package> <version>"
9+
exit 1
10+
fi
11+
if [[ ! -d $package ]]; then
12+
echo "Package $package does not exist"
13+
exit 1
14+
fi
15+
16+
confirm="n"
17+
read -r -p "Release $package $version? [y/N] " confirm
18+
if [[ ! $confirm =~ ^[yY]$ ]]; then
19+
echo "Aborted"
20+
exit 1
21+
fi
22+
23+
cd $package
24+
uv version $version
25+
git commit -am "Release $package $version"
26+
git tag $package-$version
27+
git push origin main
28+
git push origin $package-$version
29+
echo "Release $package $version complete"
30+
31+
32+

0 commit comments

Comments
 (0)