-
Notifications
You must be signed in to change notification settings - Fork 293
41 lines (36 loc) · 1.12 KB
/
pypi-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
34
35
36
37
38
39
40
41
name: Publish Release to PyPI
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Debug information
run: |
echo 'sha: ${{ github.sha }}'
echo 'ref: ${{ github.ref }}'
# This action will download the artifact for workflow runs that
# happen for this actual commit (the commit that the tag points to).
# It also restores the files timestamps.
- name: Download wheels from commit ${{ github.sha }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: python-package.yml
workflow_conclusion: success
commit: ${{ github.sha }}
name: wheels
path: dist
- name: Download sdist from commit ${{ github.sha }}
uses: dawidd6/action-download-artifact@v2
with:
workflow: python-package.yml
workflow_conclusion: success
commit: ${{ github.sha }}
name: sdist
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}