0.0.1a #18
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: Build and Publish | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Build distribution for Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: [windows-latest] # Optional: build on multiple platforms | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pypa/build | |
run: python -m pip install build>=1.2.1 | |
- name: Build a binary wheel and a source tarball | |
run: python -m build | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pylibde265-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/ | |
pypi-publish: | |
name: Upload release to PyPI | |
needs: build # Ensure the build job completes successfully before running this job | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: [windows-latest] | |
steps: | |
- name: Download distribution packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: pylibde265-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip-existing: true # Optional: skip uploading existing packages |