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

chore: update release process #2278

Merged
merged 14 commits into from
Mar 21, 2023
Merged

Conversation

DaniPopes
Copy link
Collaborator

Motivation

Solution

  • Automatically generate CHANGELOG.md with git-cliff on a cargo-release hook
  • Update documentation for the release process and how to contribute

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

@DaniPopes DaniPopes marked this pull request as draft March 17, 2023 20:52
@DaniPopes DaniPopes marked this pull request as ready for review March 18, 2023 00:40
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Some changes needed in the release script. I'm still testing this but overall really nice work.

Can you also integrate this https://github.com/cargo-bins/release-pr, so we can start doing releases on cron weekly?

Comment on lines +121 to +131
info "creating git commit"
exec_or_print cargo release commit "${COMMON_FLAGS[@]}" $SIGN_COMMIT

info "publishing crates"
exec_or_print cargo release publish "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}"

info "tagging commits"
cargo release tag "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}" $SIGN_TAG

info "pushing commits and tags to remote"
cargo release push "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}"
Copy link
Owner

Choose a reason for hiding this comment

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

cargo release public/commit/tag/push are not commands, is there a mistake here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it is using this cargo extension? https://github.com/crate-ci/cargo-release

Copy link
Owner

Choose a reason for hiding this comment

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

Oh I was on v0.20 looks like latest has more stuff!

@gakonst
Copy link
Owner

gakonst commented Mar 21, 2023

I'm giving https://github.com/MarcoIeni/release-plz a try

Comment on lines +18 to +33
"""
# template for the changelog body
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [Unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | title }}
{% for commit in commits %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first | split(pat="\\n") | first }}\
{% endfor %}
{% endfor %}\n
"""
Copy link
Owner

Choose a reason for hiding this comment

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

any chance we can also add the PR author in the changelog?

@gakonst
Copy link
Owner

gakonst commented Mar 21, 2023

OK let's send it, updated my cargo-release command. Will revise with release-plz in the near future.

@gakonst gakonst merged commit f7a066e into gakonst:master Mar 21, 2023
@DaniPopes DaniPopes deleted the chore/release-process branch March 21, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants