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

Triggers snapshot release two times and fails the Github Action #4

Closed
enesozturk opened this issue Sep 29, 2022 · 1 comment
Closed

Comments

@enesozturk
Copy link

Description

Hi @benjervis, @mrm007. I'm using Changeset for version releasing with GitHub Actions and used your packages for snapshot tests on the develop branch. I've set up the flow and it's working as expected except for one weird issue:

I see on the logs that it's publishing new snapshot releases to the NPM registry:

🦋  info Publishing "@MY_ORG/react" at "0.0.0-develop-20220928231449"

But after these, I see the following error:

🦋  error npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/@MY_ORG/react - You cannot publish over the previously published versions: 0.0.0-develop-20220928231449.

Somehow, it triggers the release two times, and this causes the Action to fail. Do you have any idea why it can happen?

@enesozturk
Copy link
Author

In my monorepo, the reason was the publish script inside the packages. Changeset was trying to run the publish a second time unintentionally, so it's trying to publish again. Renaming publish script is solving the issue.

In packages/X/package.json:

{
- "publish": "pnpm publish"
+ "publish-package": "pnpm publish"
}

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

No branches or pull requests

1 participant