0.25.0 - TDLib 1.8.44 #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish PyPI | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build sdist | |
run: python -m build --sdist | |
- name: Store sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: dist/*.tar.gz | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
platform: linux | |
arch: x86_64 | |
- os: macos-latest | |
platform: darwin | |
arch: x86_64 | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
platform: darwin | |
arch: arm64 | |
target: arm64-apple-darwin | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Set architecture for macOS | |
if: matrix.platform == 'darwin' | |
run: | | |
echo "ARCHFLAGS=-arch ${{ matrix.arch }}" >> $GITHUB_ENV | |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV | |
- name: Build wheel | |
run: python -m build --wheel | |
continue-on-error: true | |
- name: Store wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.platform }}-${{ matrix.arch }} | |
path: dist/*.whl | |
if: success() | |
publish: | |
name: Publish to PyPI | |
needs: [build_sdist, build_wheels] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/aiotdlib | |
permissions: | |
id-token: write | |
steps: | |
- name: Download sdist | |
uses: actions/download-artifact@v4 | |
with: | |
name: sdist | |
path: dist | |
- name: Download all wheels | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: wheels-* | |
path: dist | |
merge-multiple: true | |
- name: Publish to PyPI | |
uses: pypa/[email protected] |