Merge pull request #5 from Ouranosinc/snyk-fix-4fcd2dbb2fa0b7cf9ff702… #11
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: | |
- pull_request | |
- push | |
- release | |
- workflow_dispatch | |
jobs: | |
deploy_pypi: | |
if: ${{ success() && (contains(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Build Distribution Package | |
run: python setup.py sdist && python setup.py bdist_wheel | |
- name: Push Package to PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |