File tree 3 files changed +53
-0
lines changed
3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 63
63
uses : coverallsapp/github-action@master
64
64
with :
65
65
github-token : ${{ secrets.GITHUB_TOKEN }}
66
+
67
+ publish-crate :
68
+ if : startsWith(github.ref, 'refs/tags/')
69
+ runs-on : ubuntu-latest
70
+ needs : [test]
71
+ steps :
72
+ - name : Set up Rust
73
+ uses : hecrj/setup-rust-action@v1
74
+ - uses : actions/checkout@v2
75
+ - name : Publish
76
+ shell : bash
77
+ run : |
78
+ cargo publish --token ${{ secrets.CRATES_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,3 +34,6 @@ serde_json = { version = "1.0", optional = true }
34
34
[dev-dependencies ]
35
35
simple_logger = " 1.6"
36
36
matches = " 0.1"
37
+
38
+ [package .metadata .release ]
39
+ disable-publish = true
Original file line number Diff line number Diff line change
1
+ # Releasing
2
+
3
+ Releasing, i.e. crate publishing, has been automated via GitHub Actions.
4
+
5
+ We use the [ ` cargo release ` ] ( https://github.com/sunng87/cargo-release )
6
+ subcommand to ensure correct versioning. Install via:
7
+
8
+ ```
9
+ $ cargo install cargo-release
10
+ ```
11
+
12
+ ** Before releasing** ensure ` CHANGELOG.md ` is updated appropriately.
13
+
14
+ ## Process
15
+
16
+ Using ` cargo-release ` we can author a new minor release like so:
17
+
18
+ ```
19
+ $ cargo release minor --skip-publish
20
+ ```
21
+
22
+ ** Ensure publishing is skipped** since pushing the resulting tag upstream will
23
+ handle crate publishing automatically.
24
+
25
+ This will create a new tag, ` 0.6.0 ` with the message,
26
+ ` (cargo-release) sqlparser version 0.6.0 ` .
27
+
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:
30
+
31
+ ```
32
+ git push origin 0.6.0
33
+ ```
34
+
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 ` .)
You can’t perform that action at this time.
0 commit comments