1
1
# Releasing
2
2
3
- Releasing, i.e. crate publishing, has been automated via GitHub Actions.
3
+ ## Prerequisites
4
+ Publishing to crates.io has been automated via GitHub Actions, so you will only
5
+ need push access to the [ ballista-compute GitHub repository] ( https://github.com/ballista-compute/sqlparser-rs )
6
+ in order to publish a release.
4
7
5
8
We use the [ ` cargo release ` ] ( https://github.com/sunng87/cargo-release )
6
9
subcommand to ensure correct versioning. Install via:
@@ -9,29 +12,47 @@ subcommand to ensure correct versioning. Install via:
9
12
$ cargo install cargo-release
10
13
```
11
14
12
- ** Before releasing** ensure ` CHANGELOG.md ` is updated appropriately.
13
-
14
15
## Process
15
16
16
- Using ` cargo-release ` we can author a new minor release like so:
17
+ 1 . ** Before releasing** ensure ` CHANGELOG.md ` is updated appropriately and that
18
+ you have a clean checkout of the ` main ` branch of the sqlparser repository:
19
+ ```
20
+ $ git fetch && git status
21
+ On branch main
22
+ Your branch is up to date with 'upstream/main'.
17
23
18
- ```
19
- $ cargo release minor --skip-publish
20
- ```
24
+ nothing to commit, working tree clean
25
+ ```
26
+ * If you have the time, check that the examples in the README are up to date.
21
27
22
- ** Ensure publishing is skipped** since pushing the resulting tag upstream will
23
- handle crate publishing automatically.
28
+ 2. Using `cargo-release` we can publish a new release like so:
24
29
25
- This will create a new tag, ` 0.6.0 ` with the message,
26
- ` (cargo-release) sqlparser version 0.6.0 ` .
30
+ ```
31
+ $ cargo release minor --push-remote upstream
32
+ ```
27
33
28
- Once the tag is created, pushing the tag upstream will trigger a publishing
29
- process to crates.io. Now to push our example tag:
34
+ You can add `--dry-run` to see what the command is going to do,
35
+ or `--skip- push` to stop before actually publishing the release.
30
36
31
- ```
32
- git push origin 0.6.0
33
- ```
37
+ `cargo release` will then:
38
+
39
+ * Bump the minor part of the version in `Cargo.toml` (e.g. `0.7.1-alpha.0`
40
+ -> `0.8.0`. You can use `patch` instead of `minor`, as appropriate).
41
+ * Create a new tag (e.g. `v0.8.0`) locally
42
+ * Push the new tag to the specified remote (`upstream` in the above
43
+ example), which will trigger a publishing process to crates.io as part of
44
+ the [corresponding GitHub Action](https://github.com/ballista-compute/sqlparser-rs/blob/main/.github/workflows/rust.yml).
45
+
46
+ Note that credentials for authoring in this way are securely stored in
47
+ the (GitHub) repo secrets as `CRATE_TOKEN`.
48
+ * Bump the crate version again (to something like `0.8.1-alpha.0`) to
49
+ indicate the start of new development cycle.
50
+
51
+ 3. Push the updates to the `main` branch upstream:
52
+ ```
53
+ $ git push upstream
54
+ ```
55
+
56
+ 4. Check that the new version of the crate is available on crates.io:
57
+ https://crates.io/crates/sqlparser
34
58
35
- (Note that this process is fully automated; credentials
36
- for authoring in this way are securely stored in the repo secrets as
37
- ` CRATE_TOKEN ` .)
0 commit comments