Skip to content

v5.13.0

v5.13.0 #46

Workflow file for this run

---
name: PyPI publish
# Publish once a maintainer clicks publish on a draft release
# and approves the GitHub actions job
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
environment: pypi-prod
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry twine
- name: Bump version number
run: poetry version ${{ github.event.release.tag_name }}
- name: Build and publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN_HERA }}
run: |
poetry build
twine upload -u __token__ -p $PYPI_PASSWORD --skip-existing dist/*
rm -rf dist/*
- name: Rename hera to hera-workflows for backwards compat
run: |
sed -i 's/name = "hera" # project-name/name = "hera-workflows" # project-name/g' pyproject.toml
sed -i 's/name = "hera" # project-name/name = "hera-workflows" # project-name/g' src/hera/_version.py
- name: Build and publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry build
twine upload -u __token__ -p $PYPI_PASSWORD --skip-existing dist/*