Create python-publish.yml
Browse files- python-publish.yml +38 -0
python-publish.yml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
# This workflow will upload a Python Package using Twine when a release is created
|
4 |
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
5 |
+
|
6 |
+
# This workflow uses actions that are not certified by GitHub.
|
7 |
+
# They are provided by a third-party and are governed by
|
8 |
+
# separate terms of service, privacy policy, and support
|
9 |
+
# documentation.
|
10 |
+
|
11 |
+
name: Upload Python Package
|
12 |
+
|
13 |
+
on:
|
14 |
+
release:
|
15 |
+
types: [published]
|
16 |
+
|
17 |
+
jobs:
|
18 |
+
deploy:
|
19 |
+
|
20 |
+
runs-on: ubuntu-latest
|
21 |
+
|
22 |
+
steps:
|
23 |
+
- uses: actions/checkout@v2
|
24 |
+
- name: Set up Python
|
25 |
+
uses: actions/setup-python@v2
|
26 |
+
with:
|
27 |
+
python-version: '3.x'
|
28 |
+
- name: Install dependencies
|
29 |
+
run: |
|
30 |
+
python -m pip install --upgrade pip
|
31 |
+
pip install build
|
32 |
+
- name: Build package
|
33 |
+
run: python -m build
|
34 |
+
- name: Publish package
|
35 |
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
36 |
+
with:
|
37 |
+
user: __token__
|
38 |
+
password: ${{ secrets.PYPI_API_TOKEN }}
|