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

Npm publishing after github release breaks github actions #1034

Closed
kaermorchen opened this issue Aug 25, 2023 · 3 comments
Closed

Npm publishing after github release breaks github actions #1034

kaermorchen opened this issue Aug 25, 2023 · 3 comments

Comments

@kaermorchen
Copy link

Hi. Thanks for this amazing tool.

I have small problem. This is a picture of my release steps.

image

Publish to npm after Create a release on GitHub but I have github action which started on publishing event and it needs fresh (v0.3.1 in this example). Npm isn't have v0.3.1 and the action breaks down.

Can we switch the order of the steps?

From this:

  • Commit
  • Tag
  • Push
  • Create a release on GitHub
  • Publish to npm

To this:

  • Commit
  • Tag
  • Push
  • Publish to npm
  • Create a release on GitHub
@webpro
Copy link
Collaborator

webpro commented Aug 25, 2023

Not really. But since the npm publish is a command you can run from a hook, here's one idea:

{
  "npm": {
    "publish": false
  },
  "hooks": {
    "before:github:release": "npm publish [...]"
  }
}

Not sure how this works when npm asks for OTP, though.

@ghiscoding
Copy link
Contributor

For GitHub Actions requiring OTP input, I use this wait-for-secrets Action, it provides a link that you can click and opens another tab with a form where you can enter your OTP and when provided the CI workflow continues

@webpro
Copy link
Collaborator

webpro commented May 8, 2024

Thanks, @ghiscoding!

Closing this one.

@webpro webpro closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
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

3 participants