Skip to content

Commit 24ac822

Browse files
authored
ci: add covector (#1)
1 parent 2d8b799 commit 24ac822

File tree

6 files changed

+101
-12
lines changed

6 files changed

+101
-12
lines changed

.changes/config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"gitSiteUrl": "https://github.com/SSPS-KB/workshop-bot/",
3+
"pkgManagers": {},
4+
"packages": {
5+
"workshop-bot": {
6+
"path": ".",
7+
"manager": "rust",
8+
"version": true,
9+
"getPublishedVersion": "git log bot-v${ pkgFile.version } -1 --pretty=%Cgreen${ pkgFile.version } || echo \"not published yet\"",
10+
"publish": "git tag bot-v${ pkgFile.version }"
11+
},
12+
"i18n": {
13+
"path": "./crates/i18n",
14+
"manager": "rust",
15+
"version": true,
16+
"getPublishedVersion": "git log i18n-v${ pkgFile.version } -1 --pretty=%Cgreen${ pkgFile.version } || echo \"not published yet\"",
17+
"publish": "git tag i18n-v${ pkgFile.version }"
18+
}
19+
}
20+
}

.changes/initial-release.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"i18n": minor
3+
"workshop-bot": minor
4+
---
5+
Add initial changelog

.changes/readme.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changes
2+
3+
##### via https://github.com/jbolda/covector
4+
5+
As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
6+
7+
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
8+
9+
Use the following format:
10+
11+
```md
12+
---
13+
"package-a": patch
14+
"package-b": minor
15+
---
16+
17+
Change summary goes here
18+
19+
```
20+
21+
Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
22+
23+
Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
24+
25+
Given a version number MAJOR.MINOR.PATCH, increment the:
26+
27+
- MAJOR version when you make incompatible API changes,
28+
- MINOR version when you add functionality in a backwards compatible manner, and
29+
- PATCH version when you make backwards compatible bug fixes.
30+
31+
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: changelog
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
changelog:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0 # required for use of git history
16+
- name: git config
17+
run: |
18+
git config --global user.name "${{ github.event.pusher.name }}"
19+
git config --global user.email "${{ github.event.pusher.email }}"
20+
- name: covector version
21+
uses: jbolda/covector/packages/action@covector-v0.8
22+
id: covector
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
command: 'version-or-publish'
26+
createRelease: true
27+
- name: Create Pull Request With Versions Bumped
28+
id: cpr
29+
uses: peter-evans/create-pull-request@v3
30+
if: steps.covector.outputs.commandRan == 'version'
31+
with:
32+
title: "Publish New Versions"
33+
commit-message: "publish new versions"
34+
labels: "version updates"
35+
branch: "release"
36+
body: ${{ steps.covector.outputs.change }}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1+
lib = { }
2+
13
[package]
24
name = "workshop-bot"
3-
version = "0.1.0"
5+
version = "0.2.0"
46
edition = "2021"
57
publish = false
68

79
[workspace]
8-
members = ["crates/*"]
9-
10-
[lib]
10+
members = [ "crates/*" ]
1111

1212
[dependencies]
1313
i18n = { path = "./crates/i18n" }
14-
1514
anyhow = "1.0.68"
16-
serenity = { version = "0.11.5", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] }
17-
reqwest = { version = "0.11.14", default-features = false, features = ["json", "multipart", "stream", "rustls-tls"] }
18-
19-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
15+
serenity = { version = "0.11.5", default-features = false, features = [ "client", "gateway", "rustls_backend", "model" ] }
16+
reqwest = { version = "0.11.14", default-features = false, features = [ "json", "multipart", "stream", "rustls-tls" ] }
17+
tokio = { version = "1.25.0", features = [ "macros", "rt-multi-thread" ] }
2018
tracing = "0.1.37"
2119
tracing-subscriber = "0.3.16"
22-
23-
serde = { version = "1.0.152", features = ["derive"] }
20+
serde = { version = "1.0.152", features = [ "derive" ] }
2421
toml = { version = "0.7.1" }
2522
serde_json = "1.0.91"

0 commit comments

Comments
 (0)