Skip to content

Commit

Permalink
Merge pull request redpanda-data#16095 from rockwotj/sdk-release
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwotj authored Jan 12, 2024
2 parents 750bbdb + a26f32f commit bfa1c9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/transform-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: transform-sdk-release
on:
push:
tags:
- 'v*'
- 'transform-sdk/*'

jobs:
list-golang:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/transform-sdk/rust/scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[^"]+"',
Expand Down

0 comments on commit bfa1c9d

Please sign in to comment.