Closed

Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
Summary
The event trigger in the following example does not perform the function described in the docs. I experimented after looking for various event triggers and was able to do what was suggested by using 'published' instead of 'created'.
Current example
# ...
on:
release:
types: [created]
# ...
Suggested changes
## ...
on:
release:
types: ['published']
## ...
Other changes
If this change is applied I also suggest to update the following:
## Publishing packages to the npm registry
Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs when the `release` event triggers with type `created`. The workflow publishes the package to the npm registry if CI tests pass.
To:
## Publishing packages to the npm registry
You can trigger a workflow to publish your NPM package every time you [publish a new release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release). The process in the following example is executed when the release event of type 'published' is triggered. If the CI tests pass, the process uploads the package to the npm registry.
Additional information
You can see a working example in this project. Before this commit I used the exact same example as suggest in the docs, but after creating the releases the workflow was not triggered. The NPM package was only published after I change the event trigger as mentioned previously.
Activity