Skip to content

automate crate publishing #238

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

Merged
merged 4 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ serde_json = { version = "1.0", optional = true }
[dev-dependencies]
simple_logger = "1.0.1"
matches = "0.1"

[package.metadata.release]
disable-publish = true
19 changes: 12 additions & 7 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@

Releasing, i.e. crate publishing, has been automated via GitHub Actions.

In order to author a new release, you simply tag the desired revision and push
the resulting tag.
We use the [`cargo release`](https://github.com/sunng87/cargo-release)
subcommand to ensure correct versioning. Install via:

**Before releasing** ensure `CHANGELOG.md` is updated appropriately as well as
`Cargo.toml`.
```
$ cargo install cargo-release
```

**Before releasing** ensure `CHANGELOG.md` is updated appropriately.

## Process

Please ensure you follow the correct format when creating new tags. For
instance:
Using `cargo-release` we can author a new minor release like so:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not thinking of the new releases as "minor", so perhaps it would be useful to remind that this means 0.(N+1) in our context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure that makes sense to me. Maybe we should simply link to the CHANGELOG where that's described?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but CHANGELOG doesn't mention "minor" releases either. Technically, "minor" is the correct term with regards to semver, but in context of sqlparser using it without mentioning semver is slightly weird. Do what you think is best, I don't have a strong opinion on if or how this should be addressed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll leave this as-is for now.


```
git tag -a '0.6.0' -m '(cargo-release) sqlparser version 0.6.0'
$ cargo release minor --skip-publish
```

**Ensure publishing is skipped** since pushing the resulting tag upstream will
handle crate publishing automatically.

This will create a new tag, `0.6.0` with the message,
`(cargo-release) sqlparser version 0.6.0`.

Expand Down