-
-
Notifications
You must be signed in to change notification settings - Fork 44
44 lines (38 loc) · 1.1 KB
/
deploy.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish distributions
on:
push:
branches:
- '*'
tags:
- v*
jobs:
build-and-publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install poetry
python -m pip install twine
python -m poetry install
- name: Build and publish to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI }}
run: |
python -m poetry build
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
- name: Publish to PyPI (if it's a new tag)
if: github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m poetry build
twine upload dist/*