Skip to content

Workflow file for this run

name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types:
- published
jobs:
build-n-publish:
name: Publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set buildx alias
run: docker buildx install
- name: Install docker pushrm
run: |
sudo wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Tag components
run: ./scripts/tag_components.sh -o $GITHUB_REF_NAME -n latest
- name: Tag data explorer
run: ./scripts/tag_explorer.sh -o $GITHUB_REF_NAME -n latest
- name: Download distributions from test.PyPI
run: |
pip install --upgrade pip
pip download fondant==$GITHUB_REF_NAME -d dist --index-url https://test.pypi.org/simple/ --no-deps --only-binary fondant
pip download fondant==$GITHUB_REF_NAME -d dist --index-url https://test.pypi.org/simple/ --no-deps --no-binary fondant
- name: Publish distribution 📦 to PyPI if triggered by release
uses: pypa/[email protected]
with:
name: pypi
url: https://pypi.org/p/fondant