apollo-sentry-helper
apollo-sentry-helper copied to clipboard
Add npm publish workflow
This PR adds a github actions workflow to publish the package to NPM on every new release.
We would just need to worry about bumping the version and then creating a new release. The workflow will run the steps to make sure that the build is working as expected and publish it to NPM.
We should also add the dependabot integration to this repo, it'll create a new PR to every new release of the dependencies used in the apollo-sentry-helper
package.
The coolest thing is that we're able to add reviewers to avoid breaking changes when merging these updates, and other kinds of stuff, like labels.
Flux:
- A PR is merged to the master branch - The bump version workflow will run
- A new release is created - The npm publish workflow will run
Flux:
- A PR is merged to the master branch - The bump version workflow will run
- A new release is created - The npm publish workflow will run
Isn't it better to publish to NPM when there is a new release? So we have better control over our publish and over our versions.
For example if we have 2 MRs ready to be merged, we don't need to send 2 new versions to NPM, we may want to release them together.
We need to specify release tags
Flux:
- A PR is merged to the master branch - The bump version workflow will run
- A new release is created - The npm publish workflow will run
Isn't it better to publish to NPM when there is a new release? So we have better control over our publish and over our versions.
For example if we have 2 MRs ready to be merged, we don't need to send 2 new versions to NPM, we may want to release them together.
@gabrielpra1
A new release is created - The npm publish workflow will run
The workflow that will publish the package will only run after a release
be published on the github repo. Refer to the action:
on:
release:
types: [published]
We also would need to have a branch for staging, in order to merge the pull requests of dependabot
, and just merge it for new releases. Every merge to the master branch will trigger the workflow responsible to bump the package version.