apollo-sentry-helper icon indicating copy to clipboard operation
apollo-sentry-helper copied to clipboard

Add npm publish workflow

Open LauraBeatris opened this issue 4 years ago • 5 comments

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.

LauraBeatris avatar Aug 09 '20 00:08 LauraBeatris

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.

Screen Shot 2020-08-08 at 21 59 36

LauraBeatris avatar Aug 09 '20 01:08 LauraBeatris

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

LauraBeatris avatar Aug 12 '20 14:08 LauraBeatris

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 avatar Aug 12 '20 17:08 gabrielpra1

We need to specify release tags

image

pedro-lb avatar Aug 12 '20 17:08 pedro-lb

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.

LauraBeatris avatar Aug 12 '20 17:08 LauraBeatris