-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (38 loc) · 1003 Bytes
/
python-package.yml
File metadata and controls
43 lines (38 loc) · 1003 Bytes
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_upload
on:
push:
tags:
- '**'
- '!**-rc**'
- '!**nightly**'
jobs:
build:
name: PyPI Upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: 'true'
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install latest pip, build, twine
run: |
python -m pip install --upgrade --disable-pip-version-check pip
python -m pip install --upgrade build twine
- name: Build wheel and source distributions
run: |
python -m build
- name: Upload to PyPI via Twine
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload --verbose -u '__token__' dist/*
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/*