Skip to content

Commit

Permalink
added a release pipeline (#17)
Browse files Browse the repository at this point in the history
* ci: added release pipeline

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>

* ci: removed cargo-dist and did some refactoring

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>

* ci: fixed failing clippy check

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>

* ci: fixed comments

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>

* ci: refactored linter by changing toolchain

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>

---------

Signed-off-by: rjtch <tchuinkoufongue@gmail.com>
  • Loading branch information
rjtch authored Mar 3, 2024
1 parent 06d5076 commit 802b657
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
# Share one `target` directory at the project root the Cargo project and workspace in sdk-rust
target-dir = "target"
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Install rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
toolchain: stable
components: clippy, rustfmt
- name: Install development tools
uses: taiki-e/install-action@v2
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
release-plz:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
10 changes: 2 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ members = ["cdevents-sdk", "generator"]
edition = "2021"
version = "0.1.0"
authors = [
# The actual list of contributors can be retrieved from the git log
"The CDEvents Rust SDK Authors",
# The actual list of contributors can be retrieved from the git log
"The CDEvents Rust SDK Authors",
]
license = "Apache-2.0"
repository = "https://github.com/cdevents/sdk-rust"
rust-version = "1.75"
publish = false

[workspace.metadata.release]
pre-release-commit-message = "🚀 (cargo-release) version {{version}}"
tag-prefix = ""
tag-name = "{{prefix}}{{version}}"
tag-message = "🔖 {{version}}"
4 changes: 2 additions & 2 deletions generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ clap = { version = "4", features = ["derive"] }
cruet = "0.14"
handlebars = { version = "5", features = ["dir_source"] }
handlebars_misc_helpers = { version = "0.15", default-features = false, features = [
"string",
"json",
"string",
"json",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down

0 comments on commit 802b657

Please sign in to comment.