Skip to content

Commit 247fe28

Browse files
authored
Merge pull request #36 from platformsh/publish
Publish updates
2 parents c9ac9b3 + 6c96f56 commit 247fe28

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

.github/workflows/pypi-publish.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,31 @@ on:
55

66
jobs:
77
deploy:
8-
name: '[publish] pypi'
8+
name: '[Build/publish] pypi'
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
- name: Setup Python 3.7
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.7
16+
- name: Prep package
17+
run: python -m pip install --upgrade pipenv wheel
18+
- run: pipenv install
19+
- run: pipenv run "pytest"
1220
- name: Get tag
13-
id: vars
21+
id: getTag
1422
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
15-
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
23+
- name: Create packages
24+
run: pipenv run python setup.py sdist bdist_wheel
25+
- name: Verify tag match
1626
env:
17-
GHACTION_TAG: ${{ steps.vars.outputs.tag }}
27+
GHACTION_TAG: ${{ steps.getTag.outputs.tag }}
28+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
29+
run: pipenv run python setup.py verify
30+
- name: Publish to pypi
31+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
1832
uses: pypa/gh-action-pypi-publish@v1.4.1
1933
with:
20-
user: __token__
21-
password: ${{ secrets.PYPI_API_TOKEN }}
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)