Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Merge pull request #92 from PrefectHQ/ft/bump-release-python #10

Merge pull request #92 from PrefectHQ/ft/bump-release-python

Merge pull request #92 from PrefectHQ/ft/bump-release-python #10

Workflow file for this run

name: Build & Release
on:
push:
tags:
- "v*"
jobs:
build-release:
name: Build Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install packages
run: |
python -m pip install --upgrade pip build
python -m pip install --upgrade --upgrade-strategy eager -e .[dev]
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: built-package
path: "./dist"
publish-release:
name: Publish release to PyPI
needs: [build-release]
environment: "prod"
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: built-package
path: "./dist"
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
build-and-publish-docs:
name: Build and publish docs
needs: [build-release, publish-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: requirements*.txt
- name: Build docs
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e .[dev]
mkdocs build
- name: Publish docs
uses: JamesIves/[email protected]
with:
branch: docs
folder: site