Skip to content

feat: add warning when trying to install pre-release version (#362) #145

feat: add warning when trying to install pre-release version (#362)

feat: add warning when trying to install pre-release version (#362) #145

on:
push:
branches:
- main
permissions:
id-token: write
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
pgai_release_created: ${{ steps.release.outputs['projects/pgai--release_created'] }}
tag_name: ${{ steps.release.outputs['projects/pgai--tag_name'] }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-pypi:
name: Publish to PyPi
needs: release-please
if: needs.release-please.outputs.pgai_release_created
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.29"
enable-cache: true
cache-dependency-glob: "./projects/pgai/uv.lock"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "./projects/pgai/.python-version"
- name: Build the project
working-directory: ./projects/pgai
run: uv build --no-sources
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./projects/pgai/dist
release-docker:
name: Publish to Docker Hub
needs: release-please
if: needs.release-please.outputs.pgai_release_created
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up RELEASE_TAG
run: |
echo "RELEASE_TAG=${{ needs.release-please.outputs.tag_name }}" | sed 's/pgai-//' >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: timescale/pgai-vectorizer-worker
labels: |
org.opencontainers.image.description=A worker for self-hosted pgai vectorizers
org.opencontainers.image.title=pgai-vectorizer-worker
tags: |
type=raw,value=${{ env.RELEASE_TAG }}
type=raw,value=latest
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }}
password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:projects/pgai"
push: true
tags: |
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64