2023-03-03 10:03:12 -07:00
|
|
|
name: Release (nightly)
|
|
|
|
on:
|
2023-11-12 16:49:15 -07:00
|
|
|
schedule:
|
|
|
|
- cron: '23 23 * * *'
|
2023-03-03 10:03:12 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
2023-11-12 16:49:15 -07:00
|
|
|
check_nightly:
|
2023-03-03 10:03:12 -07:00
|
|
|
if: vars.BUILD_NIGHTLY != ''
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2023-11-12 16:49:15 -07:00
|
|
|
commit: ${{ steps.check_for_new_commits.outputs.commit }}
|
2023-03-03 10:03:12 -07:00
|
|
|
steps:
|
2023-11-12 17:30:01 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-12 16:49:15 -07:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Check for new commits
|
|
|
|
id: check_for_new_commits
|
2023-03-03 10:03:12 -07:00
|
|
|
run: |
|
2024-02-11 06:58:18 -07:00
|
|
|
relevant_files=("yt_dlp/*.py" ':!yt_dlp/version.py' "setup.py" "bundle/*.py")
|
2023-11-12 16:49:15 -07:00
|
|
|
echo "commit=$(git log --format=%H -1 --since="24 hours ago" -- "${relevant_files[@]}")" | tee "$GITHUB_OUTPUT"
|
2023-03-03 10:03:12 -07:00
|
|
|
|
2023-11-12 16:49:15 -07:00
|
|
|
release:
|
|
|
|
needs: [check_nightly]
|
|
|
|
if: ${{ needs.check_nightly.outputs.commit }}
|
|
|
|
uses: ./.github/workflows/release.yml
|
2023-03-03 10:03:12 -07:00
|
|
|
with:
|
2023-11-12 16:49:15 -07:00
|
|
|
prerelease: true
|
|
|
|
source: nightly
|
2023-03-03 10:03:12 -07:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2023-11-12 16:49:15 -07:00
|
|
|
packages: write
|
|
|
|
id-token: write # mandatory for trusted publishing
|
|
|
|
secrets: inherit
|