GH workflow update #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyPI Publish | |
on: | |
push: | |
branches-ignore: | |
- 'develop' | |
- 'feature/*' | |
tags: | |
- '**' | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@master | |
# Setup Python | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.12 | |
# Install Dependencies | |
- name: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build wheel setuptools | |
--user | |
# Build Package | |
- name: Build a binary wheel and a source tarball | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: >- | |
python | |
setup.py | |
bdist_wheel | |
sdist | |
# Publish | |
- name: Publish distribution 📦 to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_DJANGO_MINIO_BACKEND }} |