Skip to content

Release 2.16.1

Release 2.16.1 #76

Workflow file for this run

name: Publish Python package
on:
release:
types: [released, prereleased]
workflow_dispatch:
inputs:
commit:
description: "Commit to build from"
required: true
default: "main"
jobs:
build-pypi-dists:
name: Build Python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit }}
# Versioneer only generates correct versions with a full fetch
fetch-depth: 0
persist-credentials: false
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "requirements*.txt"
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache-dependency-path: "**/package-lock.json"
- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -e .[dev]
- name: Build UI
run: |
prefect dev build-ui
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish build artifacts
uses: actions/upload-artifact@v4
with:
name: pypi-dists
path: "./dist"
publish-pypi-dists:
name: Publish to PyPI
environment: "prod"
needs: [build-pypi-dists]
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: pypi-dists
path: "./dist"
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
name: ci