Skip to content

Commit 5be072d

Browse files
authored
Merge pull request #1 from mahimairaja/feat/add-pushlish-gh
feat: added publishing pipeline
2 parents e4708a4 + 6554648 commit 5be072d

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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/

0 commit comments

Comments
 (0)