Merge pull request #383 from lucasvazq/dependabot/pip/pillow-9.0.1 #316
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: Publish 🐍 distribution 📦 to TestPyPI and PyPI | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [closed] | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if Merge | |
if: github.event.pull_request.merged == true | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup 🐍 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install build | |
run: python -m pip install build | |
- name: Build a binary wheel and a source tarball | |
run: python -m build --sdist --wheel --outdir dist/ | |
- name: Publish the distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish the distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |