-
Notifications
You must be signed in to change notification settings - Fork 261
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
Bug: output published
is always false
when used with changeset publish --no-git-tag
#141
Comments
This is covered by Does this satisfy your use case or do you need to know more about what has been done by
I agree that it's not the best way to handle this - I'm unsure what's the best way to share a better "structured" output from a CLI tool? I guess something like
That wouldn't quite work as we call |
Essentially, that's my problem, I need to know when
I barbarically proposed #142 but then I realized the flow is a lot more complicated than that, |
I'm not 100% sure if I understand this so if you could rephrase I would appreciate it. I might just reiterate what you have said here but as I'm not sure if we are on the same page I'll try to add some context. If you provide a custom However we'd decide to pass the information around this would always require the user to conform to our expected shape, it's like a communication protocol between the script and this action.
To understand your use case better - why don't you want to create git tags? |
So since on
We have a fair amount of packages (~30) and we release quite frequently (partly because we use Like said, I do understand our workflow might not be common enough to drive changes like #143 but I am doing this to make use of Let me know what you think! Thanks! |
I think that I would still prefer to output stuff to the CLI stdout - while knowing that it can sometimes be a little bit problematic. In the past, I've created such an issue about introducing --json flag. I think that if this would be implemented then we could use that flag here. This would skipping tag creation with |
Gotcha, closed #143 |
q: are u interested in implementing that |
sure thing, why not 😃 curious though, how do you envision us scanning those JSON from the |
Just grab the stdout and parse it - we can also be a little bit more resistant and use a startegy like this one: https://github.com/changesets/changesets/pull/676/files |
I bumped into a small problem. So we're capturing the output of the publish script, for me, my script is something like yarn publish:prepare && changeset publish so the output looks like
Point being, there are a lot of
What do you think? In a way, this is not like the behavior of UPDATE: I see |
If we can't retrieve the JSON or if if the retrieved JSON is incorrect then we should fallback to the current extraction logic based on |
We faced this issue recently, and we ended up changing the way the published and outputs are generated; the thing we thought was that the |
I agree, although in general, I would like to figure out a better way to share the structured output between the CLI and the and |
One idea would be use process messages. It can be a better way to integrate. |
We have several teams that use Once they're out, we add a comment to the PR with a list of packages and versions that have been published. To enable this, we can't use These are ephemeral releases that we don't need to keep around, but right now they go into git history alongside production releases. It would be great if we could keep these releases out of git but still get the list of releases from |
@Andarist While testing out my change in #130 I found out that when I set my publish script to use
changeset publish --no-git-tag
, the outputpublished
is alwaysfalse
. This is due to the following piece of code:action/src/run.ts
Lines 145 to 155 in e8ffc2d
releasedPackages
is only populated when the textNew tag:
is found in the CLI output. I'm not sure if this is still the right indicator for successful publishing, instead, I think we should fix it so that as long as no error thrown when running the publishing script, we should set the outputpublished
totrue
.I believe a lot of people depends on this output flag in their github actions script, especially to distinguish between
publish flow
vs.creating the new version PR
flow. I have suggested what I think is a potential fix in #142, let me know what you think. Thanks!The text was updated successfully, but these errors were encountered: