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

ci: create a release-plz action #884

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jdrouet
Copy link
Contributor

@jdrouet jdrouet commented Jun 10, 2024

This PR creates a configuration for release-plz.
To make this work, we need to follow the first 2 steps from this doc. This will add a secret token that will allow this new action to publish the new release to crates.io.

Fixes #880

@jdrouet jdrouet requested a review from pront June 10, 2024 18:30
@jdrouet jdrouet added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Jun 10, 2024
@pront
Copy link
Collaborator

pront commented Jun 17, 2024

Hey @jdrouet, thanks for this. Is this a replacement for just publishing to crates.io? Could we also make it publish a version tag?

@jdrouet
Copy link
Contributor Author

jdrouet commented Jun 26, 2024

Hey @jdrouet, thanks for this. Is this a replacement for just publishing to crates.io? Could we also make it publish a version tag?

It should generate version tags, readmes and publish to crates.io. The complete process.

@pront
Copy link
Collaborator

pront commented Jul 1, 2024

To make this work, we need to follow the first 2 steps from this doc. This will add a secret token that will allow this new action to publish the new release to crates.io.

Hi @jdrouet, this looks promising. Are you willing to followup with the remaining steps and demonstrate how to create the next VRL release?

@pront pront requested a review from jszwedko July 3, 2024 17:36
Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I agree this looks promising. A couple of questions:

  • Would this let us delete some of the release scripts currently in scripts/?
  • It seems like this publishes on every push to main. Do we want that?
  • Agreed with @pront that we should document this. I'd suggest doing so in the README

@jdrouet
Copy link
Contributor Author

jdrouet commented Jul 10, 2024

Sorry for the late reply.

Nice, I agree this looks promising. A couple of questions:

  • Would this let us delete some of the release scripts currently in scripts/?

I think, we should let release-plz do everything, not use custom things, so yes, we should delete those scripts.

  • It seems like this publishes on every push to main. Do we want that?

No, it's more magic than that. It will run on every commit on the main branch to generate a new release PR but it will release only when merging that release PR. (Here is an example or here a simpler one)

In that release PR, it will update the changelog, update the version of the package according to the semantic versioning stuff. You can modify the PR if you don't agree with the picked version or if you wanna change the changelog.

  • Agreed with @pront that we should document this. I'd suggest doing so in the README

Could you clarify what you would expect in the readme?
If we want to use this, we should:

  • make sure we have a crates.io token set in the github-action configuration
  • create the release-plz action in our workflow
  • check that it properly creates the release PR
  • merge the first one to create a release. If it doesn't work, we can still release it manually.

But first, we could also try using the release-plz binary locally to see if it works properly with VRL (never done that locally, I always go rogue on the CI for my project, but I understand we cannot do that here).

To conclude this, if we merge this PR, it will not release VRL. It will create a PR (or update the existing one) each time we merge something in the main branch. And IF and ONLY IF, we merge that PR, it will release the package (creating the release in github and publishing it in crates.io).

@pront pront marked this pull request as draft July 15, 2024 20:57
@jdrouet
Copy link
Contributor Author

jdrouet commented Jul 21, 2024

After discussing with @pront and @jszwedko , the way the changelog is generated was brought. In conclusion, we should disable the changelog generation.

@jdrouet jdrouet added the domain: ci Anything related to Vector's CI environment label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: ci Anything related to Vector's CI environment no-changelog Changes in this PR do not need user-facing explanations in the release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install release-plz to simplify release procedure
3 participants