release-master.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Release (master)
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - "yt_dlp/**.py"
  8. - "!yt_dlp/version.py"
  9. - "bundle/*.py"
  10. - "pyproject.toml"
  11. - "Makefile"
  12. - ".github/workflows/build.yml"
  13. concurrency:
  14. group: release-master
  15. permissions:
  16. contents: read
  17. jobs:
  18. release:
  19. if: vars.BUILD_MASTER != ''
  20. uses: ./.github/workflows/release.yml
  21. with:
  22. prerelease: true
  23. source: master
  24. permissions:
  25. contents: write
  26. packages: write # For package cache
  27. actions: write # For cleaning up cache
  28. id-token: write # mandatory for trusted publishing
  29. secrets: inherit
  30. publish_pypi:
  31. needs: [release]
  32. if: vars.MASTER_PYPI_PROJECT != ''
  33. runs-on: ubuntu-latest
  34. permissions:
  35. id-token: write # mandatory for trusted publishing
  36. steps:
  37. - name: Download artifacts
  38. uses: actions/download-artifact@v4
  39. with:
  40. path: dist
  41. name: build-pypi
  42. - name: Publish to PyPI
  43. uses: pypa/gh-action-pypi-publish@release/v1
  44. with:
  45. verbose: true