Skip to content

Commit 5289225

Browse files
authored
build: including pypi release on release
1 parent cc05d91 commit 5289225

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
deploy:
17+
18+
runs-on: ubuntu-latest
19+
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install pipenv
30+
pipenv install
31+
- name: Build and install the library
32+
run: |
33+
pipenv run poetry build
34+
pipenv run pip install ./dist/$(ls ./dist | grep .whl)
35+
- name: Test with pytest
36+
run: |
37+
pipenv run pytest
38+
- name: Publish package
39+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)