Skip to content

v1.3.0

v1.3.0 #1

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
test:
name: unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
python -m pip install mock coverage pytest
- name: Run tests
run: |
cd tests
export SKIP_UT_WITH_DFLOW=0
export DFLOW_DEBUG=1
coverage run -m unittest -v -f
coverage report
build:
name: build distributions
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build package
run: |
python -m pip install --upgrade pip build
python -m build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish:
name: publish distributions to PyPI
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/apex-flow/
permissions:
id-token: write
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package distributions to PyPI with Trusted Publishing
if: ${{ env.PYPI_API_TOKEN == '' }}
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish package distributions to PyPI with API token
if: ${{ env.PYPI_API_TOKEN != '' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ env.PYPI_API_TOKEN }}