Skip to content

Commit

Permalink
add sdist creation workflow;
Browse files Browse the repository at this point in the history
add publishing to pypi from pypi-dev branch.
  • Loading branch information
MarshalX committed Feb 9, 2022
1 parent b4ddf59 commit 906f676
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_linux_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ jobs:
with:
name: "wrtc for Linux (x86_64)"
path: ./wheelhouse/*.whl

- name: Publish a Python distribution to PyPI.
if: github.ref == 'refs/heads/pypi-dev' && github.repository == 'MarshalX/python-webrtc'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ./wheelhouse/
8 changes: 8 additions & 0 deletions .github/workflows/build_macos_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ jobs:
with:
name: wrtc for macOS (${{ matrix.arch }})
path: ./wheelhouse/*.whl

- name: Publish a Python distribution to PyPI.
if: github.ref == 'refs/heads/pypi-dev' && github.repository == 'MarshalX/python-webrtc'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ./wheelhouse/
4 changes: 1 addition & 3 deletions .github/workflows/build_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
push:
branches:
- main
- pypi-dev
- ci-dev
paths:
- '.github/workflows/build_manylinux.yml'
- 'build/Dockerfile'
Expand All @@ -18,7 +16,7 @@ jobs:
matrix:
arch: [
"x86_64",
# "aarch64", # it's not possible to do on GHA because there is time limit (more then 6 hours under QEMU)
# "aarch64", # it's not possible to do on GHA because there is time limit (more than 6 hours under QEMU)
]

steps:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/build_windows_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,11 @@ jobs:
with:
name: "wrtc wheels for Windows"
path: "C:/src/wheelhouse/*.whl"

- name: Publish a Python distribution to PyPI.
if: github.ref == 'refs/heads/pypi-dev' && github.repository == 'MarshalX/python-webrtc'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: "C:/src/wheelhouse/"
43 changes: 43 additions & 0 deletions .github/workflows/create_sdist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create and publish Source Distribution
on:
push:
branches:
- main
- pypi-dev
paths:
- '.github/workflows/publish_sdist.yml'
- 'python-webrtc/cpp/**'
- 'CMakeLists.txt'
- 'setup.py'
jobs:
create_sdist:
name: Create and publish Source Distribution
runs-on: ubuntu-latest

steps:
- name: Clone.
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup Python.
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Create Source Distribution.
uses: pypa/[email protected]
run: python setup.py sdist

- name: Upload artifacts.
uses: actions/upload-artifact@v2
with:
name: "wrtc sdist"
path: ./dist/*

- name: Publish a Python distribution to PyPI.
if: github.ref == 'refs/heads/pypi-dev' && github.repository == 'MarshalX/python-webrtc'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 906f676

Please sign in to comment.