Surnet / swagger-jsdoc

Generates swagger/openapi specification based on jsDoc comments and YAML files.
MIT License
1.69k stars 228 forks source link

Use Semantic release to publish release notes and to NPM #313

Closed superflyxxi closed 2 years ago

daniloab commented 2 years ago

can we add a previous step to ask if we want to release it? Then, only when allowing the publish will be called?

superflyxxi commented 2 years ago

Yeah. I'll have to look into how to do that with git flows. You want a manual approval step before it attempts to publish.

superflyxxi commented 2 years ago

The closest I found was this: https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments and this https://cloudlumberjack.com/posts/github-actions-approvals/

I guess if we set up a production npm "Environment" in github, you can configure it to require approvals. In that "Environment", you can add a secret for NPM_AUTH_TOKEN. Finally, I can have the github action references that "Environment" to fetch its secret. And it would require approval before it happens.

How does it sound?

daniloab commented 2 years ago

The closest I found was this: https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments and this https://cloudlumberjack.com/posts/github-actions-approvals/

I guess if we set up a production npm "Environment" in github, you can configure it to require approvals. In that "Environment", you can add a secret for NPM_AUTH_TOKEN. Finally, I can have the github action references that "Environment" to fetch its secret. And it would require approval before it happens.

How does it sound?

I like this flow but the one problem is that I cant create an environment var to the repo. Maybe @chdanielmueller can help us on this to make the release more robust?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

superflyxxi commented 2 years ago

Hey all, what should we do? I'm okay with letting this close.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.