forked from docopt/docopt.c
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.43 KB
/
main.yml
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
name: PyPi publish
on:
push:
branches:
- 'master'
pull_request:
types:
- opened
- reopened
jobs:
test:
name: ${{ matrix.os.name }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
matrix:
python-version: [3.9]
os:
- name: Linux
runs-on: ubuntu-latest
python_platform: linux
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: install_dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
- name: PyPi release
run: |
pip install twine
python setup.py sdist bdist_wheel
python -m twine upload --repository pypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_NON_INTERACTIVE: 1
if: matrix.python-version == '3.9' && matrix.os.name == 'Linux' && github.ref == 'refs/heads/master'