This repository was archived by the owner on May 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
chore: migrate to release-please with independent release lines #1539
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f6d550b
chore: migrate to release-please with independent release lines
goldmedal 9103b72
docs: add RELEASING.md for release-please workflow guide
goldmedal 0bf4794
fix: address CodeRabbit review on release workflows
goldmedal 8960df6
fix: tighten rc_version validation against manifest base version
goldmedal 69b6b07
fix: harden rc-release workflow
goldmedal 2a39f96
fix: block pre-release creation on cancelled publish jobs
goldmedal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| name: Publish ibis-server Docker image | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| description: "Version number (e.g. 0.25.0)" | ||
| required: true | ||
| type: string | ||
| tag_name: | ||
| description: "Git tag to checkout (e.g. ibis-server-v0.25.0)" | ||
| required: true | ||
| type: string | ||
| prerelease: | ||
| description: "Whether this is a pre-release build" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| env: | ||
| IBIS_IMAGE: ghcr.io/canner/wren-engine-ibis | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: | ||
| - runner: ubuntu-latest | ||
| platform: linux/amd64 | ||
| - runner: linux_arm64_runner | ||
| platform: linux/arm64 | ||
| runs-on: ${{ matrix.arch.runner }} | ||
| steps: | ||
| - name: Prepare platform | ||
| run: | | ||
| platform=${{ matrix.arch.platform }} | ||
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.tag_name }} | ||
| - name: Docker meta | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.IBIS_IMAGE }} | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build and push by digest | ||
| id: build | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| platforms: ${{ matrix.arch.platform }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| context: ./ibis-server | ||
| build-args: | | ||
| ENV=prod | ||
| MCP_SERVER_VERSION=${{ inputs.version }} | ||
| build-contexts: | | ||
| wren-core-py=./wren-core-py | ||
| wren-core=./wren-core | ||
| wren-core-base=./wren-core-base | ||
| mcp-server=./mcp-server | ||
| outputs: type=image,name=${{ env.IBIS_IMAGE }},push-by-digest=true,name-canonical=true,push=true | ||
| - name: Export digest | ||
| run: | | ||
| mkdir -p /tmp/digests | ||
| digest="${{ steps.build.outputs.digest }}" | ||
| touch "/tmp/digests/${digest#sha256:}" | ||
| - name: Upload digest | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: digests-${{ env.PLATFORM_PAIR }} | ||
| path: /tmp/digests/* | ||
| if-no-files-found: error | ||
| retention-days: 1 | ||
|
|
||
| merge: | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Download digests | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: /tmp/digests | ||
| pattern: digests-* | ||
| merge-multiple: true | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Docker meta | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.IBIS_IMAGE }} | ||
| tags: | | ||
| type=raw,value=${{ inputs.version }} | ||
| ${{ !inputs.prerelease && 'type=raw,value=latest' || '' }} | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Create manifest list and push | ||
| working-directory: /tmp/digests | ||
| run: | | ||
| docker buildx imagetools create \ | ||
| $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
| $(printf '${{ env.IBIS_IMAGE }}@sha256:%s ' *) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Publish mcp-server | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| description: "Version number (e.g. 0.25.0 or 0.25.0-rc.1)" | ||
| required: true | ||
| type: string | ||
| tag_name: | ||
| description: "Git tag to checkout (e.g. mcp-server-v0.25.0)" | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| verify: | ||
| name: Verify mcp-server version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.tag_name }} | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
| - name: Verify version matches tag | ||
| working-directory: mcp-server | ||
| env: | ||
| EXPECTED_VERSION: ${{ inputs.version }} | ||
| run: | | ||
| TOML_VERSION=$(python -c " | ||
| import re | ||
| with open('pyproject.toml') as f: | ||
| content = f.read() | ||
| match = re.search(r'^version\s*=\s*\"(.+?)\"', content, re.MULTILINE) | ||
| print(match.group(1)) | ||
| ") | ||
| echo "pyproject.toml version: $TOML_VERSION" | ||
| echo "Expected version: $EXPECTED_VERSION" | ||
| if [ "$TOML_VERSION" = "$EXPECTED_VERSION" ]; then | ||
| echo "Version verified successfully" | ||
| else | ||
| # For RC releases, version files aren't bumped — verify base version is consistent | ||
| BASE_VERSION=$(echo "$EXPECTED_VERSION" | sed 's/-rc\..*//') | ||
| if [ "$TOML_VERSION" = "$BASE_VERSION" ]; then | ||
| echo "::notice::RC release — pyproject.toml has base version $TOML_VERSION, RC version is $EXPECTED_VERSION" | ||
| else | ||
| echo "::error::Version mismatch: pyproject.toml has $TOML_VERSION but expected $EXPECTED_VERSION (base: $BASE_VERSION)" | ||
| exit 1 | ||
| fi | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Publish wren-engine to PyPI | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| description: "Version number (e.g. 0.3.0)" | ||
| required: true | ||
| type: string | ||
| tag_name: | ||
| description: "Git tag to checkout (e.g. wren-v0.3.0)" | ||
| required: true | ||
| type: string | ||
| pypi_target: | ||
| description: "Publish target (pypi or testpypi)" | ||
| required: false | ||
| type: string | ||
| default: "pypi" | ||
|
goldmedal marked this conversation as resolved.
|
||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build distribution | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.tag_name }} | ||
| - name: Set version | ||
| env: | ||
| VERSION: ${{ inputs.version }} | ||
| run: | | ||
| sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" wren/pyproject.toml | ||
| sed -i "s/^__version__ = \".*\"/__version__ = \"${VERSION}\"/" wren/src/wren/__init__.py | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
| - name: Install build tool | ||
| run: pip install build | ||
| - name: Build sdist and wheel | ||
| run: python -m build | ||
| working-directory: wren | ||
| - name: Upload distributions | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: wren/dist/ | ||
|
|
||
| publish: | ||
| name: Publish to ${{ inputs.pypi_target }} | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: ${{ inputs.pypi_target }} | ||
| url: ${{ inputs.pypi_target == 'pypi' && 'https://pypi.org/project/wren-engine/' || 'https://test.pypi.org/project/wren-engine/' }} | ||
| steps: | ||
| - name: Download distributions | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| - name: List artifacts | ||
| run: ls -lhR dist/ | ||
| - name: Publish | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: ${{ inputs.pypi_target == 'testpypi' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }} | ||
| packages-dir: dist/ | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.