From a26f32f18c288bcf2d5d473d559dc086774bec44 Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Fri, 12 Jan 2024 13:32:41 -0600 Subject: [PATCH] transform-sdk: decouple releases from broker Decouple the broker releases. Transform SDK releases will be in the format of `transform-sdk/v0.0.0`. We can release these at any time and all SDKs are released together. Signed-off-by: Tyler Rockwood --- .github/workflows/transform-sdk-release.yml | 15 ++++++++++----- src/transform-sdk/rust/scripts/publish.py | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/transform-sdk-release.yml b/.github/workflows/transform-sdk-release.yml index 9c8619ae10aec..255b9040f4d8f 100644 --- a/.github/workflows/transform-sdk-release.yml +++ b/.github/workflows/transform-sdk-release.yml @@ -11,7 +11,7 @@ name: transform-sdk-release on: push: tags: - - 'v*' + - 'transform-sdk/*' jobs: list-golang: @@ -29,20 +29,25 @@ jobs: go-version: 1.20.6 - name: Create golang specific tag + id: gotag uses: actions/github-script@v7 with: script: | + const version = '${{github.ref_name}}'.slice('transform-sdk/'.length); github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: 'refs/tags/src/transform-sdk/go/transform/${{github.ref_name}}', + ref: 'refs/tags/src/transform-sdk/go/transform/' + version, sha: context.sha - }) - + }); + // Return the result so we can use it to publish via `go list` below. + return version; + result-encoding: string - name: List module working-directory: src/transform-sdk/go # https://go.dev/doc/modules/publishing - run: go list -m github.com/redpanda-data/redpanda/src/transform-sdk/go/transform@${{github.ref_name}} + run: + go list -m github.com/redpanda-data/redpanda/src/transform-sdk/go/transform@${{steps.gotag.outputs.result}} publish-rust: name: Publish Rust Transform SDK diff --git a/src/transform-sdk/rust/scripts/publish.py b/src/transform-sdk/rust/scripts/publish.py index f61e173bf4d64..d1d2dafe7ee81 100755 --- a/src/transform-sdk/rust/scripts/publish.py +++ b/src/transform-sdk/rust/scripts/publish.py @@ -27,8 +27,8 @@ def publish_package(pkg: str): def publish(version: str): - # Cargo does not like the `v` prefix we add to tags, so remove it. - version = version.removeprefix('v') + # Cargo does not like the prefix we add to tags, so remove it. + version = version.removeprefix('transform-sdk/v') # Set the version in the TOML file toml = CARGO_TOML_FILE.read_text() toml = re.sub(pattern='^version = "[^"]+"',