-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John-Paul Dakran
committed
Feb 7, 2022
1 parent
dabd264
commit b1a8c18
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: detect-secrets-pypi | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
|
||
tox: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python: ['3.6', '3.7', '3.8', '3.9'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- run: python -m pip install --upgrade setuptools pip tox virtualenv | ||
# Run tox only for the installed py version on the runner as outlined in the python matrix | ||
# Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini | ||
- run: tox -e py | ||
- run: tox -e mypy | ||
|
||
deploy: | ||
# lets run tests before we push anything to pypi, much like we do internally | ||
needs: tox | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
# this will create a .tar.gz with all the code (i.e., an sdist) | ||
- run: python setup.py sdist | ||
# and finally, upload the above sdist to public PyPI | ||
- uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
with: | ||
password: ${{ secrets.pypi_password }} |