-
-
Notifications
You must be signed in to change notification settings - Fork 479
33 lines (33 loc) · 989 Bytes
/
python-publish.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
name: Production deploy
on:
workflow_run:
workflows: ["Python Tests"]
types:
- completed
jobs:
pypi-publish:
if: |
github.repository_owner == 'oauthlib' &&
${{ github.event.workflow_run.conclusion == 'success' }} &&
${{ github.ref_type == 'tag' }}
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/oauthlib
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install prereq
run: pip install wheel
- name: Build python package
run: python setup.py build
- name: Package python package
run: python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1