Merge pull request #33 from DataIntegrationGroup/pre-production #52
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 Python 🐍 distributions 📦 to PyPI and TestPyPI | |
# pushes only occur on successful pull request merges | |
# this makes it so that the main branch gets published to PyPi, not the | |
# target branch from the pull request (pre-production) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish-if-merged: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- name: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
attestations: false |