release-nightly.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Release (nightly)
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - "yt_dlp/**.py"
  8. - "!yt_dlp/version.py"
  9. concurrency:
  10. group: release-nightly
  11. cancel-in-progress: true
  12. permissions:
  13. contents: read
  14. jobs:
  15. prepare:
  16. if: vars.BUILD_NIGHTLY != ''
  17. runs-on: ubuntu-latest
  18. outputs:
  19. version: ${{ steps.get_version.outputs.version }}
  20. steps:
  21. - uses: actions/checkout@v3
  22. - name: Get version
  23. id: get_version
  24. run: |
  25. python devscripts/update-version.py "$(date -u +"%H%M%S")" | grep -Po "version=\d+(\.\d+){3}" >> "$GITHUB_OUTPUT"
  26. build:
  27. needs: prepare
  28. uses: ./.github/workflows/build.yml
  29. with:
  30. version: ${{ needs.prepare.outputs.version }}
  31. channel: nightly
  32. permissions:
  33. contents: read
  34. packages: write # For package cache
  35. secrets:
  36. GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
  37. publish:
  38. needs: [prepare, build]
  39. uses: ./.github/workflows/publish.yml
  40. secrets:
  41. ARCHIVE_REPO_TOKEN: ${{ secrets.ARCHIVE_REPO_TOKEN }}
  42. permissions:
  43. contents: write
  44. with:
  45. channel: nightly
  46. prerelease: true
  47. version: ${{ needs.prepare.outputs.version }}
  48. target_commitish: ${{ github.sha }}