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.
|
||||
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
|
|
@ -1,19 +1,10 @@
|
|||
name: release.yml
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
flavour:
|
||||
required: true
|
||||
default: dev
|
||||
type: choice
|
||||
options:
|
||||
- dev
|
||||
- main
|
||||
description: Dev or Main release
|
||||
|
||||
jobs:
|
||||
release-github:
|
||||
name: Create GitHub Release from ${{ inputs.flavour }}
|
||||
name: Create GitHub Release from ${{ github.ref_name }}
|
||||
outputs:
|
||||
tag: ${{ steps.create_tag.outputs.tag }}
|
||||
version: ${{ steps.create_tag.outputs.version }}
|
||||
|
|
@ -22,10 +13,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out ${{ inputs.flavour }}
|
||||
- name: Check out ${{ github.ref_name }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.flavour }}
|
||||
ref: ${{ github.ref_name }}
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
|
||||
|
|
@ -57,16 +48,16 @@ jobs:
|
|||
|
||||
release-pypi-package:
|
||||
needs: release-github
|
||||
name: Release PyPI Package from ${{ inputs.flavour }}
|
||||
name: Release PyPI Package from ${{ github.ref_name }}
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out ${{ inputs.flavour }}
|
||||
- name: Check out ${{ github.ref_name }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.flavour }}
|
||||
ref: ${{ github.ref_name }}
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
|
|
@ -80,23 +71,23 @@ jobs:
|
|||
- name: Build distributions
|
||||
run: uv build
|
||||
|
||||
- name: Publish ${{ inputs.flavour }} release to PyPI
|
||||
- name: Publish ${{ github.ref_name }} release to PyPI
|
||||
env:
|
||||
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||
run: uv publish
|
||||
|
||||
release-docker-image:
|
||||
needs: release-github
|
||||
name: Release Docker Image from ${{ inputs.flavour }}
|
||||
name: Release Docker Image from ${{ github.ref_name }}
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out ${{ inputs.flavour }}
|
||||
- name: Check out ${{ github.ref_name }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.flavour }}
|
||||
ref: ${{ github.ref_name }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
|
@ -108,7 +99,7 @@ jobs:
|
|||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Dev Docker Image
|
||||
if: ${{ inputs.flavour == 'dev' }}
|
||||
if: ${{ github.ref_name == 'dev' }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
|
|
@ -117,12 +108,12 @@ jobs:
|
|||
tags: cognee/cognee:${{ needs.release-github.outputs.version }}
|
||||
labels: |
|
||||
version=${{ needs.release-github.outputs.version }}
|
||||
flavour=${{ inputs.flavour }}
|
||||
flavour=${{ github.ref_name }}
|
||||
cache-from: type=registry,ref=cognee/cognee:buildcache
|
||||
cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max
|
||||
|
||||
- name: Build and push Main Docker Image
|
||||
if: ${{ inputs.flavour == 'main' }}
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
|
|
@ -133,6 +124,6 @@ jobs:
|
|||
cognee/cognee:latest
|
||||
labels: |
|
||||
version=${{ needs.release-github.outputs.version }}
|
||||
flavour=${{ inputs.flavour }}
|
||||
flavour=${{ github.ref_name }}
|
||||
cache-from: type=registry,ref=cognee/cognee:buildcache
|
||||
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/
|
||||
|
||||
deployment/helm/values-local.yml
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue