gha: updated softprops/action-gh-release to v2 #57
Workflow file for this run
This file contains hidden or 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: Run Tests | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tests: | |
name: Python ${{ matrix.python-version }} • ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.13"] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
python-version: 3.9 | |
- os: ubuntu-latest | |
python-version: "3.10" | |
- os: ubuntu-latest | |
python-version: "3.11" | |
- os: ubuntu-latest | |
python-version: "3.12" | |
steps: | |
- run: echo ${{github.ref}} | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.arch }} | |
- name: Setup Python dependencies | |
run: | | |
python -m pip install -U pip setuptools pytest pytest-github-actions-annotate-failures | |
- name: Install ffmpeg_downloader package | |
run: pip install -q . | |
- name: Install ffmpeg | |
run: ffdl install -y | |
- name: Install ffmpeg snapshot | |
run: ffdl install -y -U snapshot | |
- name: Run tests | |
run: pytest -vv | |
- name: Uninstall ffmpeg | |
run: ffdl uninstall -y | |
distribute: | |
name: Distribution | |
permissions: write-all | |
runs-on: ubuntu-latest | |
needs: tests | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
- name: Setup Python dependencies | |
run: | | |
python -m pip install -U pip setuptools | |
pip install -U build | |
- name: Build a binary wheel and a source tarball | |
run: python -m build --sdist --wheel --outdir dist/ . | |
- name: add python distribution files to release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Publish distribution 📦 to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ | |
# skip_existing: true | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# password: ${{ secrets.PYPI_API_TOKEN }} |