-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Try to make mediasoup-worker-prebuild CI task only run in releases #1280
Try to make mediasoup-worker-prebuild CI task only run in releases #1280
Conversation
@@ -44,29 +46,36 @@ jobs: | |||
steps: | |||
- name: Checkout | |||
uses: actions/checkout@v4 | |||
if: startsWith(github.ref, "refs/tags/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not skipping the whole workflow instead? Skipping individual steps looks odd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not skipping the whole workflow instead?
How to do that? 😀
That's exactly what I've been trying to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is if
at job level as well: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif
But if job is only triggered by tag, this check doesn't have any effect in the first place.
@@ -2,6 +2,8 @@ name: mediasoup-worker-prebuild | |||
|
|||
on: | |||
push: | |||
branches: | |||
- v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add v3
branch if you only want to run this workflow on releases? I believe these conditions are additive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did assuming they are not additive...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you're right, the documentation isn've very clear about this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading #1243, I suspect you're pushing tag first and then you're creating release for that tag later. The error is confusing, but on GitHub you can only attach assets to releases and pre-releases, so if release it missing, upload will fail too. You need to change the workflow to be triggered by release, not tag. And probably exclude rust-*
because it is not needed for those releases.
@@ -44,29 +46,36 @@ jobs: | |||
steps: | |||
- name: Checkout | |||
uses: actions/checkout@v4 | |||
if: startsWith(github.ref, "refs/tags/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is if
at job level as well: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif
But if job is only triggered by tag, this check doesn't have any effect in the first place.
@@ -2,6 +2,8 @@ name: mediasoup-worker-prebuild | |||
|
|||
on: | |||
push: | |||
branches: | |||
- v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you're right, the documentation isn've very clear about this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
So you mean that my first commit was way better? |
I do think it should have been sufficient, also BTW you can test how it performs by forking into personal repo and trying some tags/releases, from my experience that is sometimes the only way to find out how it works in practice. |
@nazar-pc it looks that And yes, I¡ll do this in a fork. |
I'm closing this PR and trying things in a personal mediasoup fork. Cosmetic changes done here are now in a separate PR #1281. |
@nazar-pc let's follow the discussion and experiments in the issue report: #1243 (comment) |
Fixes #1243
While it's true that this PR is not running
mediasoup-worker-prebuild
, I think it's not gonna work. I assume that given the documentation of softprops/action-gh-release.Some info:
Bonus tracks: