4.4.1 #191
Workflow file for this run
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: Release | |
on: | |
release: | |
types: [published] | |
# For non-release, we want to exercise (a) building, (b) uploading to test.pypi.org | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
python -m pip install -e .[signals] -r requirements-dev.txt | |
- name: Build packages | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ github.event_name == 'release' }} | |
- name: Publish to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ github.event_name != 'release' }} | |
with: | |
repository_url: https://test.pypi.org/legacy/ | |
# Since we run this often, it's OK if that version already exists | |
skip_existing: true |