-
Notifications
You must be signed in to change notification settings - Fork 69
43 lines (41 loc) · 1022 Bytes
/
python-package.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: Publish Python distributions to PyPI and TestPyPI
on:
push:
branches: [ master, main ]
# Don't trigger if it's just a documentation update
paths-ignore:
- '**.md'
- '**.MD'
- '**.yml'
- '**.sh'
- 'docs/**'
- 'Dockerfile'
- 'LICENSE'
- '.gitattributes'
- '.gitignore'
- '.dockerignore'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Initialize Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Dist
run: |
python setup.py sdist
- name: Release On Main PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.MAIN_PYPI }}
skip_existing: true
verbose: true
print_hash: true