release pipeline fix #3
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: Release | |
on: | |
push: | |
branches: | |
- release_test | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install dependencies | |
run: | | |
sudo apt install -y ffmpeg | |
python -m pip install --upgrade pip build | |
python -m pip install .[test] | |
- name: Run unit tests | |
run: python -m pytest tests/unit | |
- name: Build | |
run: | | |
python -m build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-dist | |
path: dist/ | |
publish: | |
needs: [build] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://test.pypi.org/project/yle-dl/ | |
permissions: | |
id-token: write | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: release-dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ |