Skip to content

Prepare migration of clickhouse-etl package into glassflow package #1

Prepare migration of clickhouse-etl package into glassflow package

Prepare migration of clickhouse-etl package into glassflow package #1

Workflow file for this run

name: Release
on:
pull_request:
types: [closed]
branches:
- main
jobs:
release:
if: |
github.event.pull_request.merged == true &&
(contains(github.event.pull_request.labels.*.name, 'bump:major') ||
contains(github.event.pull_request.labels.*.name, 'bump:minor') ||
contains(github.event.pull_request.labels.*.name, 'bump:patch'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version-file: "pyproject.toml"
- name: Set up venv
run: |
uv venv --python ${{ steps.setup-python.outputs.python-path }}
- name: Install dependencies
run: |
uv pip install -e .[build]
- name: Get version
id: current_version
run: |
echo "VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Create and push tag
run: |
git tag "v${{ steps.current_version.outputs.version }}"
git push origin "v${{ steps.current_version.outputs.version }}"
# Wait for tag to be available
sleep 2
- name: Build package
run: |
uv build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
uv run twine upload dist/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: "v${{ steps.current_version.outputs.version }}"
files: |
dist/*.whl
dist/*.tar.gz
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}