-
-
Notifications
You must be signed in to change notification settings - Fork 399
Remove published-packages output in favor of publish-output
#689
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,21 +53,14 @@ async function main() { | |
| fromPackDir, | ||
| }); | ||
|
|
||
| if (result.published) { | ||
| core.setOutput("published", "true"); | ||
| core.setOutput( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why I'd like to propose changing this? Currently, we interpret "git-tag" events as "releases". But with We should be emitting some other events for npm-only releases and allow the action to interpret them as releases. That's something to fix on the CLI side of things. But even once we do it... the user wouldn't be able to tell exactly what and how got released. We'd have to "interpret" a mix of tag/npm releases into this array of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we should have both. having to parse and handle the CLI output requires quite a lot more than just checking if the since we also have the output file now, we can change the meaning of
we could also add
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I quite like having published and tagged separated. Then we could let them decide how to handle it. Maybe also if publish passes but tag failed (or vice versa) it would be clearer which packages is affected |
||
| "published-packages", | ||
| JSON.stringify(result.publishedPackages), | ||
| ); | ||
| } else { | ||
| core.setOutput("published", "false"); | ||
| } | ||
| core.setOutput("published", result.releases.length > 0 ? "true" : "false"); | ||
| core.setOutput("output", result.output); | ||
|
|
||
| if (result.exitCode !== 0) { | ||
| throw new Error( | ||
| `Publish command exited with code ${result.exitCode}${ | ||
| result.published | ||
| ? `, but some packages were published: ${result.publishedPackages | ||
| result.releases.length | ||
| ? `, but some packages were published: ${result.releases | ||
| .map((p) => `${p.name}@${p.version}`) | ||
| .join(", ")}` | ||
| : "" | ||
|
|
||
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.