File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish OpenRTC
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ jobs :
9+ publish :
10+ name : Publish to PyPI
11+ # Only run on releases starting with 'v'
12+ if : github.event_name == 'release' && startsWith(github.event.release.tag_name, 'v')
13+ runs-on : ubuntu-latest
14+ environment : pypi
15+ permissions :
16+ contents : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : " 3.10"
28+
29+ - name : Install build dependencies
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install build
33+
34+ - name : Build package
35+ run : |
36+ python -m build
37+
38+ - name : Publish to PyPI
39+ uses : pypa/gh-action-pypi-publish@release/v1
40+ with :
41+ password : ${{ secrets.PYPI_API_TOKEN }}
42+ packages-dir : dist/
You can’t perform that action at this time.
0 commit comments