-
Notifications
You must be signed in to change notification settings - Fork 10
32 lines (30 loc) · 1.01 KB
/
pypi-publish.yml
File metadata and controls
32 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: PyPi Publish
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
with:
python-version: '3.8'
architecture: 'x64'
- name: Install dependencies
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
python -m pip install --upgrade pip
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
source $HOME/.poetry/env
poetry export -f requirements.txt -o requirements.txt --dev
pip install -r requirements.txt
- name: Build and publish the pypi package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: python3 setup.py upload
env:
TWINE_USER: __token__
TWINE_PASS: ${{ secrets.pypi_token }}