Compare commits
2 commits
main
...
chore/rele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0627789933 | ||
|
|
11e16219cc |
3 changed files with 59 additions and 35 deletions
31
.github/docs/release.md
vendored
Normal file
31
.github/docs/release.md
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
## How to make a release
|
||||||
|
|
||||||
|
### Dev release
|
||||||
|
|
||||||
|
#### Prepare release
|
||||||
|
1. Set the project version that will be released in [pyproject.toml](https://github.com/topoteretes/cognee/blob/dev/pyproject.toml#L4)
|
||||||
|
2. Update `uv.lock` with `uv lock` lock command
|
||||||
|
3. Create a PR with the changes mentioned above to `dev` and merge it.
|
||||||
|
|
||||||
|
#### Perform Release
|
||||||
|
1. Go to [Release action](https://github.com/topoteretes/cognee/actions/workflows/release.yml)
|
||||||
|
2. Select `dev` branch and run the workflow.
|
||||||
|
3. Watch the logs and make sure that everything goes well
|
||||||
|
|
||||||
|
### Main release
|
||||||
|
|
||||||
|
#### Prepare release
|
||||||
|
1. Set the project version that will be released in [pyproject.toml](https://github.com/topoteretes/cognee/blob/dev/pyproject.toml#L4)
|
||||||
|
2. Update `uv.lock` with `uv lock` lock command
|
||||||
|
3. Create a PR with the changes mentioned above to `dev` and merge it.
|
||||||
|
|
||||||
|
#### Perform Release
|
||||||
|
1. Go to [Release action](https://github.com/topoteretes/cognee/actions/workflows/release.yml)
|
||||||
|
2. Select `main` branch and run the workflow.
|
||||||
|
3. Watch the logs and make sure that everything goes well
|
||||||
|
|
||||||
|
### Release validation
|
||||||
|
|
||||||
|
1. Make sure that the correct image is published to [Docker Hub](https://hub.docker.com/r/cognee/cognee)
|
||||||
|
2. Python package is published to [PyPi](https://pypi.org/project/cognee/)
|
||||||
|
3. Find the created github release in [GitHub releases](https://github.com/topoteretes/cognee/releases). Edit/prettify the release notes if required.
|
||||||
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
|
|
@ -1,19 +1,10 @@
|
||||||
name: release.yml
|
name: release.yml
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
flavour:
|
|
||||||
required: true
|
|
||||||
default: dev
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- dev
|
|
||||||
- main
|
|
||||||
description: Dev or Main release
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-github:
|
release-github:
|
||||||
name: Create GitHub Release from ${{ inputs.flavour }}
|
name: Create GitHub Release from ${{ github.ref_name }}
|
||||||
outputs:
|
outputs:
|
||||||
tag: ${{ steps.create_tag.outputs.tag }}
|
tag: ${{ steps.create_tag.outputs.tag }}
|
||||||
version: ${{ steps.create_tag.outputs.version }}
|
version: ${{ steps.create_tag.outputs.version }}
|
||||||
|
|
@ -22,10 +13,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out ${{ inputs.flavour }}
|
- name: Check out ${{ github.ref_name }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.flavour }}
|
ref: ${{ github.ref_name }}
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v7
|
uses: astral-sh/setup-uv@v7
|
||||||
|
|
||||||
|
|
@ -42,10 +33,10 @@ jobs:
|
||||||
|
|
||||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
git tag "${TAG}"
|
git tag "${TAG}"
|
||||||
git push origin "${TAG}"
|
git push origin "${TAG}"
|
||||||
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
|
@ -54,49 +45,49 @@ jobs:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-pypi-package:
|
release-pypi-package:
|
||||||
needs: release-github
|
needs: release-github
|
||||||
name: Release PyPI Package from ${{ inputs.flavour }}
|
name: Release PyPI Package from ${{ github.ref_name }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out ${{ inputs.flavour }}
|
- name: Check out ${{ github.ref_name }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.flavour }}
|
ref: ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v7
|
uses: astral-sh/setup-uv@v7
|
||||||
|
|
||||||
- name: Install Python
|
- name: Install Python
|
||||||
run: uv python install
|
run: uv python install
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --locked --all-extras
|
run: uv sync --locked --all-extras
|
||||||
|
|
||||||
- name: Build distributions
|
- name: Build distributions
|
||||||
run: uv build
|
run: uv build
|
||||||
|
|
||||||
- name: Publish ${{ inputs.flavour }} release to PyPI
|
- name: Publish ${{ github.ref_name }} release to PyPI
|
||||||
env:
|
env:
|
||||||
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||||
run: uv publish
|
run: uv publish
|
||||||
|
|
||||||
release-docker-image:
|
release-docker-image:
|
||||||
needs: release-github
|
needs: release-github
|
||||||
name: Release Docker Image from ${{ inputs.flavour }}
|
name: Release Docker Image from ${{ github.ref_name }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out ${{ inputs.flavour }}
|
- name: Check out ${{ github.ref_name }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.flavour }}
|
ref: ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
@ -108,7 +99,7 @@ jobs:
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Dev Docker Image
|
- name: Build and push Dev Docker Image
|
||||||
if: ${{ inputs.flavour == 'dev' }}
|
if: ${{ github.ref_name == 'dev' }}
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|
@ -117,22 +108,22 @@ jobs:
|
||||||
tags: cognee/cognee:${{ needs.release-github.outputs.version }}
|
tags: cognee/cognee:${{ needs.release-github.outputs.version }}
|
||||||
labels: |
|
labels: |
|
||||||
version=${{ needs.release-github.outputs.version }}
|
version=${{ needs.release-github.outputs.version }}
|
||||||
flavour=${{ inputs.flavour }}
|
flavour=${{ github.ref_name }}
|
||||||
cache-from: type=registry,ref=cognee/cognee:buildcache
|
cache-from: type=registry,ref=cognee/cognee:buildcache
|
||||||
cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max
|
cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max
|
||||||
|
|
||||||
- name: Build and push Main Docker Image
|
- name: Build and push Main Docker Image
|
||||||
if: ${{ inputs.flavour == 'main' }}
|
if: ${{ github.ref_name == 'main' }}
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
cognee/cognee:${{ needs.release-github.outputs.version }}
|
cognee/cognee:${{ needs.release-github.outputs.version }}
|
||||||
cognee/cognee:latest
|
cognee/cognee:latest
|
||||||
labels: |
|
labels: |
|
||||||
version=${{ needs.release-github.outputs.version }}
|
version=${{ needs.release-github.outputs.version }}
|
||||||
flavour=${{ inputs.flavour }}
|
flavour=${{ github.ref_name }}
|
||||||
cache-from: type=registry,ref=cognee/cognee:buildcache
|
cache-from: type=registry,ref=cognee/cognee:buildcache
|
||||||
cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max
|
cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -197,3 +197,5 @@ SWE-bench_testsample/
|
||||||
|
|
||||||
# ChromaDB Data
|
# ChromaDB Data
|
||||||
.chromadb_data/
|
.chromadb_data/
|
||||||
|
|
||||||
|
deployment/helm/values-local.yml
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue