Skip to content
---
name: Publish pytest-minio-mock distribution 📦 to PyPI
on:
release:
types: [created]
jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pytest-minio-mock
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Purge Badge Cache
run: |
curl -X PURGE https://camo.githubusercontent.com/6dc4260b2f6a92fe29281e3d2ee7647719a3b53e481f110a2ccd39bd932d8788/68747470733a2f2f62616467652e667572792e696f2f70792f7079746573742d6d696e696f2d6d6f636b2e737667 \
&& curl -X PURGE https://pypi-camo.freetls.fastly.net/010fb347be739eaadc5dd44b84f390ddb97e62d6/68747470733a2f2f62616467652e667572792e696f2f70792f7079746573742d6d696e696f2d6d6f636b2e737667