Skip to content

Commit

Permalink
fixed publish strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Nov 16, 2021
1 parent 4412608 commit 71b296c
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

name: Publish package to PYPI

on:
release:
types: [created]
on: push

jobs:
deploy:
Expand All @@ -14,23 +12,20 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Upgrade PIP
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Python testing dependencies
pip install setuptools wheel twine
- name: Build
run: |
make install_requirements_test
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make publish
python setup.py sdist bdist_wheel
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 71b296c

Please sign in to comment.