Skip to content

Release 0.3.23 (#1301) #107

Release 0.3.23 (#1301)

Release 0.3.23 (#1301) #107

Workflow file for this run

name: Release Toolkit
on:
push:
branches:
- release
env:
PYTHON_VERSION: '3.11'
jobs:
release-pypi:
runs-on: ubuntu-latest
environment: CD
# This causes issues when CDF is down.
#needs: [lint, test, build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: snok/install-poetry@v1
with:
version: 1.6.1
virtualenvs-create: false
- name: Install dependencies
run: poetry install
- name: Build package
run: poetry build
- name: Release to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload --verbose dist/*
release-to-docker-hub:
runs-on: ubuntu-latest
environment: CD
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: version
name: Toolkit Version
# Read the version from the cognite_toolkit/_version.py file
run: echo "version=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' cognite_toolkit/_version.py)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: cognite/toolkit:${{ env.version }}, cognite/toolkit:latest