Skip to content

Commit

Permalink
Merge pull request #36 from platformsh/publish
Browse files Browse the repository at this point in the history
Publish updates
  • Loading branch information
Crell authored Feb 5, 2021
2 parents c9ac9b3 + 6c96f56 commit 247fe28
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,31 @@ on:

jobs:
deploy:
name: '[publish] pypi'
name: '[Build/publish] pypi'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Prep package
run: python -m pip install --upgrade pipenv wheel
- run: pipenv install
- run: pipenv run "pytest"
- name: Get tag
id: vars
id: getTag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- name: Create packages
run: pipenv run python setup.py sdist bdist_wheel
- name: Verify tag match
env:
GHACTION_TAG: ${{ steps.vars.outputs.tag }}
GHACTION_TAG: ${{ steps.getTag.outputs.tag }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: pipenv run python setup.py verify
- name: Publish to pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 247fe28

Please sign in to comment.