-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (39 loc) · 932 Bytes
/
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
42
43
44
45
46
47
48
49
50
name: publish
on:
workflow_run:
workflows: [tests]
branches: [master]
types: [completed]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@main
with:
fetch-depth: 5
- uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Build package
run: |
pip install build
python -m build
- uses: actions/upload-artifact@main
with:
name: dist
path: dist
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download a distribution artifact
uses: actions/download-artifact@main
with:
name: dist
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypy }}