release-nightly.yml 960 B

1234567891011121314151617181920212223242526272829303132333435
  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=("yt_dlp/*.py" ':!yt_dlp/version.py' "setup.py" "pyinst.py")
  21. echo "commit=$(git log --format=%H -1 --since="24 hours ago" -- "${relevant_files[@]}")" | tee "$GITHUB_OUTPUT"
  22. release:
  23. needs: [check_nightly]
  24. if: ${{ needs.check_nightly.outputs.commit }}
  25. uses: ./.github/workflows/release.yml
  26. with:
  27. prerelease: true
  28. source: nightly
  29. permissions:
  30. contents: write
  31. packages: write
  32. id-token: write # mandatory for trusted publishing
  33. secrets: inherit