Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Implement release workflow #32876

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Grub4K
Copy link
Contributor

@Grub4K Grub4K commented Jul 23, 2024

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

  • New feature

Description of your pull request and other information

Implements an automated release workflow, similar to yt-dlp's (Rewrite of the nightly workflow as an automated workflow_dispatch action). Also removes the old, obsolete build scripts in favor of using the current workflow.

It supports:

  • Arbitrary version tags
  • Prereleases
  • Automated changelog generation
    • This is more hacked than correct since the commit format is non normative.
      make_changelog.py can be backported if the yt-dlp commit format will be adapted
  • Separate build workflow
    • Each step is separated so adding more targets is trivial

After this is merged, the only barrier to publishing a new release will be running the "Release" workflow.

Closes #31585

@Grub4K Grub4K mentioned this pull request Jul 23, 2024
3 tasks
Copy link
Contributor Author

@Grub4K Grub4K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not test the devscripts under 2.6, but also thats not required as far as the build process goes, so...

Additional targets can be added later to the build.yml if desired

.github/workflows/build.yml Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
devscripts/changelog.py Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
@dirkf
Copy link
Contributor

dirkf commented Jul 24, 2024

I could not test the devscripts under 2.6, but also thats not required as far as the build process goes, so...

Exactly. Anyone who wants to run the scripts with 2.6 should be able to fix any problems.

Additional targets can be added later to the build.yml if desired

Sure. But this is making the same ones as the nightly, isn't it, and that's all we need for now, except that maybe there should be two versions of the youtube-dl bundled POSIX builds, adding one with #!/usr/bin/env python3.

@Grub4K
Copy link
Contributor Author

Grub4K commented Jul 24, 2024

I think adding another target for this might not make sense. Many modern os have already switched to python pointing to python 3. Additionally, there is python-is-python3 if need be.

If you disagree ill add the target though. Just let me know what to call it

@dirkf
Copy link
Contributor

dirkf commented Jul 25, 2024

I think adding another target for this might not make sense. Many modern os have already switched to python pointing to python 3. Additionally, there is python-is-python3 if need be.

If you disagree ill add the target though. Just let me know what to call it

It seems that macOS typically installs a python3 only, with no option of a python-is-python3: those users are probably less likely to understand, or be amenable to, creating a symlink. And who knows what "security" feature Apple may introduce to confound this.

If only there were some way to formulate a #! command that would find both python and python3 in some order. I haven't been able to find one that doesn't involve shipping and installing a further script, like this python_any:

#!/bin/sh
exec python3 "$@" || exec python "$@"

In all the systems where I've tried it, a sed command works (preserving the executable permission if it was set):

sed -i -e '1 s/python$/python3/' youtube-dl

As POSIX-y systems are meant to hide any platform differences between "text" and "binary" files, maybe this is good enough, once the shipped default has been decided.

Otherwise, a separate target, say youtube-dl-py3, seems to be the path of least resistance.

@Grub4K
Copy link
Contributor Author

Grub4K commented Jul 25, 2024

Done. See 2024.07.25 release for results

@Grub4K
Copy link
Contributor Author

Grub4K commented Aug 6, 2024

Side note, @dirkf, do you have access to the PyPI package?

Anyways, if needed it can easily be added based on yt-dlp workflow, or done later at any point

@dirkf dirkf mentioned this pull request Aug 8, 2024
@Grub4K
Copy link
Contributor Author

Grub4K commented Aug 12, 2024

What is the holdup on this? Anything that can be done to get this merged?

@Grub4K
Copy link
Contributor Author

Grub4K commented Oct 15, 2024

@dirkf is this PR being considered?

@dirkf
Copy link
Contributor

dirkf commented Oct 15, 2024

Definitely, but #32905 needs to be sorted before I can get back to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Release?
3 participants