Fix readme #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
release: | |
types: [published] | |
pull_request: | |
paths: | |
- '.github/workflows/publish.yml' | |
- 'maint_tools/build_default_image.py' | |
jobs: | |
pypi: | |
name: PyPI package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
workdir: | |
- "." | |
- "plugins/ray" | |
- "plugins/spark" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.x" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6 | |
id: setup-uv | |
- name: Install dependencies | |
working-directory: ${{ matrix.workdir }} | |
run: | | |
uv venv | |
uv pip install build twine setuptools wheel | |
- name: Build and publish | |
working-directory: ${{ matrix.workdir }} | |
run: | | |
uv run python -m build --wheel --installer uv | |
- name: Publish | |
if: ${{ github.event_name == 'release' }} | |
working-directory: ${{ matrix.workdir }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
uv run python -m twine upload --verbose dist/* | |
build-and-push-docker-images: | |
name: Flyte image for Python ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io/flyteorg | |
username: "${{ secrets.FLYTE_BOT_USERNAME }}" | |
password: "${{ secrets.FLYTE_BOT_PAT }}" | |
- name: Fetch the code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: ./.github/actions/setup-python-env | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install build twine setuptools wheel | |
uv pip freeze | |
- name: Build wheel | |
run: | | |
make dist | |
- name: Build and push the images | |
env: | |
FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" | |
FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" | |
run: | | |
uv run python maint_tools/build_default_image.py |