-
Notifications
You must be signed in to change notification settings - Fork 77
MOD-11297: Revamp the CI pipeline, including publishing #428
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
Changes from all commits
ff628a2
8ec7347
621d2ac
d1373f2
10468f8
2ab128e
7d85589
ac1139d
4cbbd2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Open a release PR | ||
|
|
||
| on: | ||
| workflow_dispatch: # Manual trigger only | ||
|
|
||
| jobs: | ||
| # Create a PR with the new versions and changelog, preparing the next release. | ||
| # A release will be automatically published when the PR is merged into master. | ||
| release-pr: | ||
| name: Open a release PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| concurrency: | ||
| group: release-plz-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 | ||
| with: | ||
| command: release-pr | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Release-plz | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this support releasing multiple release integration branches, e.g., a patch for 2.X and a minor for 3.X? (we do not release from master)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @LukeMathWalker Will this support multiple concurrent releases? ☝🏼
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When looking at the version history, this didn't seem like a requirement—from what I can see, no backports have been made in the last few years. I would recommend the following setup to minimise complexity:
If we need to backport something, we merge PRs into the backport branch and use something like
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once release-plz/release-plz#2438 is merged, I should be able to adjust the workflow to cut backport releases from branches. |
||
|
|
||
| jobs: | ||
| # Release unpublished packages if the latest commit merged | ||
| # a release PR into master | ||
| release: | ||
| name: Publish a new release to crates.io | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 | ||
| with: | ||
| command: release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,19 @@ | ||
| [workspace] | ||
| members = [".", "redismodule-rs-macros", "redismodule-rs-macros-internals"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it normal to have this root member like this?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I generally prefer to have all root members in subfolders, since it makes |
||
|
|
||
| [workspace.package] | ||
| version = "2.0.7" | ||
| license = "BSD-3-Clause" | ||
| edition = "2021" | ||
|
|
||
| [package] | ||
| name = "redis-module" | ||
| version = "99.99.99" | ||
| version.workspace = true | ||
| edition.workspace = true | ||
| license.workspace = true | ||
| authors = ["Gavrie Philipson <gavrie@redis.com>", "Guy Korland <guy.korland@redis.com>"] | ||
| edition = "2021" | ||
| build = "build.rs" | ||
| description = "A toolkit for building Redis modules in Rust" | ||
| license = "BSD-3-Clause" | ||
| repository = "https://github.com/RedisLabsModules/redismodule-rs" | ||
| readme = "README.md" | ||
| keywords = ["redis", "plugin"] | ||
|
|
@@ -151,6 +159,7 @@ cc = "1" | |
| default = ["min-redis-compatibility-version-6-0", "bindgen-runtime"] | ||
|
|
||
| # xor having minimum compatibility version | ||
| min-redis-compatibility-version-8-0 = ["redis-module/min-redis-compatibility-version-8-0"] | ||
| min-redis-compatibility-version-7-4 = ["redis-module/min-redis-compatibility-version-7-4"] | ||
| min-redis-compatibility-version-7-2 = ["redis-module/min-redis-compatibility-version-7-2"] | ||
| min-redis-compatibility-version-7-0 = ["redis-module/min-redis-compatibility-version-7-0"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/usr/bin/env sh | ||
| cargo build --all --all-targets --no-default-features --features min-redis-compatibility-version-7-4 | ||
| cargo build --all --all-targets --no-default-features --features min-redis-compatibility-version-8-0 | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukeMathWalker Should we add 8-0 here? Or unrelated to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add it now, but since I don't see 7.4 there either, I'm inclined to defer to another PR