release-please-action
release-please-action copied to clipboard
rust version not changed for workspace project
https://github.com/gengjiawen/monkey-rust/pull/28
@bcoe @fasterthanlime
@gengjiawen thank you for the bug report. I'll investigate tomorrow, unless @fasterthanlime is ... faster than me.
So, for a cargo workspace like this, the supported workflow is to run the release-please action once per crate in your workspace.
Instead of:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: rust
package-name: release-please-action
You could use a build matrix, something like:
jobs:
crates:
strategy:
matrix:
include:
- crate: monkey-parser
path: parser
- crate: monkey-interpreter
path: interpreter
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
monorepo-tags: true
release-type: rust
path: ${{ matrix.path }}
package-name: ${{ matrix.crate }}
(I've only listed two crates, but it seems you have 4, make sure to include all 4 - first the one with the least local dependencies, like lexer
, keep interpreter
for last!)
This matrix seems very redundant. I previously use https://github.com/pksunkara/cargo-workspaces to update my version (Maybe we can adopt similar strategy). But it doesn't fit into release-it.
Right, cargo-workspaces uses the "all crates of a workspace are the same version, they're always bumped together", which certainly simplifies some things.
Currently release-please only supports "crates of a workspace are released independently, with their own versioning scheme", that's why you need to run it for each crate. In my use case, each crate is published to a registry independently after a release-please PR has been merged. (I run cargo publish
in CI too).
As @bcoe said in #177, the Rust support is a starting point, it'll work for "the repository has a single crate" and "every crate of the workspace is bumped and released independently", not "every crate is bumped and released together" right now.
@fasterthanlime @gengjiawen I've been thinking about this problem with regards to Node.js mono-repos too. I have a repository here where I'd like to release ~170 submodules.
I don't love the idea of having both a individual and monorepo strategy for each language though, perhaps we can figure out a way to abstract this problem a bit.
@fasterthanlime Is this any progress for workspace support ? Thanks.
@fasterthanlime Is this any progress for workspace support ? Thanks.
I don't have any personal plans to implement support for your use case in the near future at the moment!
(I'm not one of the primary maintainers of this repository, I provided initial support + offered to provide some insight if requested).
@fasterthanlime If I understand this problem properly (which is the ability to release multiple modules from one repo), we've been working on a design for this.
CC: @joeldodge79
marking as feature request
, as this sounds like a request for enhancements to our Rust workspace support.