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

fix output flag published is always false when used with changeset publish --no-git-tag #142

Closed
wants to merge 2 commits into from

Conversation

akphi
Copy link
Contributor

@akphi akphi commented Jan 24, 2022

Fix #141

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2022

🦋 Changeset detected

Latest commit: 377879b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -142,17 +138,16 @@ export async function runPublish({
}
}

const result: PublishResult = { published: true, publishedPackages: [] };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought a lot about this. This somewhat changes the meaning of published, with this, it means: as long as the publishing script runs fine, we consider published=true, in a way, this is coherent with the definition of the flag in our README file: A boolean value to indicate whether a publishing is happened or not. Like I said in the issue created, I think the main issue here is we need a flag to tell us in the Github action script that whether publishing or versioning (creating the New Version PR) happened.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that relying on the New tag: output is less than ideal. However, you can (sort of) check today which script has been executed by inspecting the hasChangesets output:
https://github.com/changesets/action/pull/136/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R165

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm, thinking about it, looks like my approach is quite wrong though. Will close this PR.

@akphi akphi closed this Jan 25, 2022
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.

Bug: output published is always false when used with changeset publish --no-git-tag
2 participants