release-nightly.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Release (nightly)
  2. on:
  3. schedule:
  4. - cron: '23 23 * * *'
  5. permissions:
  6. contents: read
  7. jobs:
  8. check_nightly:
  9. if: vars.BUILD_NIGHTLY != ''
  10. runs-on: ubuntu-latest
  11. outputs:
  12. commit: ${{ steps.check_for_new_commits.outputs.commit }}
  13. steps:
  14. - uses: actions/checkout@v4
  15. with:
  16. fetch-depth: 0
  17. - name: Check for new commits
  18. id: check_for_new_commits
  19. run: |
  20. relevant_files=(
  21. "yt_dlp/*.py"
  22. ':!yt_dlp/version.py'
  23. "bundle/*.py"
  24. "pyproject.toml"
  25. "Makefile"
  26. ".github/workflows/build.yml"
  27. )
  28. echo "commit=$(git log --format=%H -1 --since="24 hours ago" -- "${relevant_files[@]}")" | tee "$GITHUB_OUTPUT"
  29. release:
  30. needs: [check_nightly]
  31. if: ${{ needs.check_nightly.outputs.commit }}
  32. uses: ./.github/workflows/release.yml
  33. with:
  34. prerelease: true
  35. source: nightly
  36. permissions:
  37. contents: write
  38. packages: write # For package cache
  39. actions: write # For cleaning up cache
  40. id-token: write # mandatory for trusted publishing
  41. secrets: inherit