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