Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"homepage": "https://github.com/cncf/xds",
"maintainers": [
{
"name": "Adi Peleg",
"github_user_id": 4787431,
"github": "adisuissa"
},
{
"github_user_id": 454682,
"github": "phlax"
}
],
"repository": [
"github:cncf/xds"
],
"versions": [],
"yanked_versions": {}
}
17 changes: 17 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- macos
- ubuntu2204
bazel:
- 7.x
- 8.x
- 9.x
tasks:
verify_targets:
name: "Verify build targets"
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- "@xds//..."
test_targets:
- "@xds//..."
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "xds-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
}
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
34 changes: 34 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go Module Release

on:
push:
tags:
- 'v*'

jobs:
release:
name: Verify and Test Go Module
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: '1.24'

- name: Verify Go module
working-directory: go
run: |
go mod verify
go mod tidy
go build ./...

- name: Run Go tests
working-directory: go
run: go test ./... -v

21 changes: 21 additions & 0 deletions .github/workflows/publish-to-bcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish to BCR

on:
push:
tags:
- 'v*'

jobs:
publish:
name: Publish to Bazel Central Registry
permissions:
contents: write
id-token: write
attestations: write
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@0bd40ad4f872b4d216d3f01bc0844ade304e2b5a # v1.1.0
with:
tag_name: ${{ github.ref_name }}
draft: false
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this already setup for this repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know


47 changes: 47 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Python Package Release

on:
push:
tags:
- 'v*'

jobs:
release:
name: Build and Publish Python Package
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cncf-xds
permissions:
contents: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
working-directory: python
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will require some creds surely

with:
packages-dir: python/dist/

- name: Upload Python artifacts to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ github.ref_name }}" python/dist/*

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "number=$VERSION" >> $GITHUB_OUTPUT

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
cat > "$RUNNER_TEMP/release-notes.md" << 'EOF'
# xDS Release ${{ github.ref_name }}

This release includes updates for all language bindings:

## Python (PyPI)
```bash
pip install cncf-xds==${{ steps.version.outputs.number }}
```

## Go Module
```bash
go get github.com/cncf/xds/go@${{ github.ref_name }}
```

## Bazel (BCR)
```starlark
bazel_dep(name = "xds", version = "${{ steps.version.outputs.number }}")
```
EOF

gh release create "${{ github.ref_name }}" \
--title "Release ${{ github.ref_name }}" \
--notes-file "$RUNNER_TEMP/release-notes.md" \
--generate-notes


64 changes: 64 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Version Bump

on:
workflow_dispatch:
inputs:
version:
description: 'New version (e.g., 1.2.3)'
required: true
type: string
create_tag:
description: 'Create and push tag'
required: true
type: boolean
default: false

jobs:
bump-version:
name: Bump Version
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Update Python version
working-directory: python
run: |
sed -i "s/version = \".*\"/version = \"${{ inputs.version }}\"/" pyproject.toml
cat pyproject.toml

- name: Update Go version (create VERSION file)
working-directory: go
run: |
echo "${{ inputs.version }}" > VERSION
cat VERSION

- name: Update Bazel version
run: |
sed -i "s/version = \".*\"/version = \"${{ inputs.version }}\"/" MODULE.bazel
cat MODULE.bazel

- name: Commit version changes
run: |
git add .
git commit -m "chore: bump version to ${{ inputs.version }}"
git push

- name: Create and push tag
if: inputs.create_tag
run: |
TAG_NAME="v${{ inputs.version }}"
git tag -a "$TAG_NAME" -m "Release version ${{ inputs.version }}"
git push origin "$TAG_NAME"
echo "Created and pushed tag: $TAG_NAME"

13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
bazel-*
MODULE.bazel.lock
__pycache__/
__pycache__/

# Python build artifacts
python/dist/
python/build/
python/*.egg-info/
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
14 changes: 14 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ Run the following command to update the generated files and commit them with you
bazel build //...
tools/generate_go_protobuf.py
```

## Versioning and Releases

For information about versioning and the release process, see [VERSIONING.md](VERSIONING.md).

### Quick Release Guide

To create a new release:

1. Use the GitHub Actions **Version Bump** workflow to update the version
2. Or manually create a tag: `git tag python/v1.2.3` or `git tag go/v1.2.3`
3. Push the tag: `git push origin <tag-name>`
4. The release workflow will automatically build and publish the package

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ https://github.com/envoyproxy/envoy/tree/main/api. Our long-term goal is to
move the entire API to this repository, this will be done opportunistically over
time as we generalize parts of the API to be less client-specific.

## Language Bindings

This repository provides xDS protocol buffer bindings for multiple languages with unified versioning:

- **Python**: Available on [PyPI](https://pypi.org/project/cncf-xds/) - `pip install cncf-xds`
- **Go**: Available as a Go module - `go get github.com/cncf/xds/go`
- **Bazel**: Available on [Bazel Central Registry](https://registry.bazel.build/) - Add to `MODULE.bazel`:
```starlark
bazel_dep(name = "xds", version = "X.Y.Z")
```

All language bindings share the same version number and are released together.

For versioning and release information, see [VERSIONING.md](VERSIONING.md).

# Mailing list and meetings

We have an open mailing list [xds-wg@lists.cncf.io](https://lists.cncf.io/g/xds-wg/) for communication and announcements. We also meet
Expand Down
Loading