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
41 changes: 41 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

[tool.bumpversion]
current_version = "0.1.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(-(?P<pre_label>alpha|beta|rc)\\.(?P<pre_n>\\d+))?"
serialize = [
"{major}.{minor}.{patch}-{pre_label}.{pre_n}",
"{major}.{minor}.{patch}"
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_files = false
ignore_missing_version = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Release version {new_version}"
allow_dirty = false
commit = false
message = "chore: bump version {current_version} → {new_version}"

[tool.bumpversion.parts.pre_label]
optional_value = "stable"
first_value = "stable"
values = ["stable", "alpha", "beta", "rc"]

[tool.bumpversion.parts.pre_n]
optional_value = "0"
first_value = "0"

# Root pom.xml - project version
[[tool.bumpversion.files]]
filename = "pom.xml"
search = "<version>{current_version}</version>"
replace = "<version>{new_version}</version>"

# Root pom.xml - lance-flink.version property
[[tool.bumpversion.files]]
filename = "pom.xml"
search = "<lance-flink.version>{current_version}</lance-flink.version>"
replace = "<lance-flink.version>{new_version}</lance-flink.version>"
37 changes: 37 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: 1
appendOnly: true
# Labels are applied based on conventional commits standard
# https://www.conventionalcommits.org/en/v1.0.0/
# These labels are later used in release notes. See .github/release.yml
labels:
# If the PR title has an ! before the : it will be considered a breaking change
# For example, `feat!: add new feature` will be considered a breaking change
- label: breaking-change
title: "^[^:]+!:.*"
- label: breaking-change
body: "BREAKING CHANGE"
- label: enhancement
title: "^feat(\\(.+\\))?!?:.*"
- label: bug
title: "^fix(\\(.+\\))?!?:.*"
- label: documentation
title: "^docs(\\(.+\\))?!?:.*"
- label: performance
title: "^perf(\\(.+\\))?!?:.*"
- label: ci
title: "^ci(\\(.+\\))?!?:.*"
- label: chore
title: "^(chore|test|build|style)(\\(.+\\))?!?:.*"
37 changes: 37 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

changelog:
exclude:
labels:
- ci
- chore
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: New Features 🎉
labels:
- enhancement
- title: Bug Fixes 🐛
labels:
- bug
- title: Documentation 📚
labels:
- documentation
- title: Performance Improvements 🚀
labels:
- performance
- title: Other Changes
labels:
- "*"
191 changes: 191 additions & 0 deletions .github/workflows/auto-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@

name: Auto Bump Version

on:
workflow_dispatch:
inputs:
bump_type:
description: 'Type of version bump'
required: false
default: 'auto'
type: choice
options:
- auto
- patch
- minor
- major

jobs:
check-for-changes:
runs-on: ubuntu-latest
outputs:
should_bump: ${{ steps.check.outputs.should_bump }}
bump_type: ${{ steps.check.outputs.bump_type }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Check for unreleased changes
id: check
run: |
# Get the last tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")

if [ -z "$LAST_TAG" ]; then
echo "No tags found, should create initial release"
echo "should_bump=true" >> $GITHUB_OUTPUT
echo "bump_type=patch" >> $GITHUB_OUTPUT
exit 0
fi

# Check for commits since last tag
COMMITS_SINCE_TAG=$(git rev-list --count ${LAST_TAG}..HEAD)

if [ "$COMMITS_SINCE_TAG" -gt 0 ]; then
echo "Found $COMMITS_SINCE_TAG commits since last tag $LAST_TAG"

if [ "${{ inputs.bump_type }}" != "auto" ] && [ -n "${{ inputs.bump_type }}" ]; then
BUMP_TYPE="${{ inputs.bump_type }}"
else
BUMP_TYPE="patch"

if git log ${LAST_TAG}..HEAD --grep="BREAKING CHANGE" --grep="!:" | grep -q .; then
BUMP_TYPE="major"
elif git log ${LAST_TAG}..HEAD --grep="^feat" --grep="^feature" | grep -q .; then
BUMP_TYPE="minor"
fi
fi

echo "should_bump=true" >> $GITHUB_OUTPUT
echo "bump_type=$BUMP_TYPE" >> $GITHUB_OUTPUT
else
echo "No commits since last tag $LAST_TAG"
echo "should_bump=false" >> $GITHUB_OUTPUT
fi

- name: Summary
run: |
echo "## Auto Bump Check" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.check.outputs.should_bump }}" == "true" ]; then
echo "✅ Version bump needed" >> $GITHUB_STEP_SUMMARY
echo "- **Bump Type:** ${{ steps.check.outputs.bump_type }}" >> $GITHUB_STEP_SUMMARY
else
echo "⏭️ No version bump needed" >> $GITHUB_STEP_SUMMARY
fi

create-bump-pr:
needs: check-for-changes
if: needs.check-for-changes.outputs.should_bump == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

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

- name: Install dependencies
run: |
pip install packaging lxml

- name: Get current version
id: current_version
run: |
CURRENT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "Current version: $CURRENT_VERSION"

- name: Calculate new version
id: new_version
run: |
python ci/calculate_version.py \
--current "${{ steps.current_version.outputs.version }}" \
--type "${{ needs.check-for-changes.outputs.bump_type }}" \
--channel "stable"

- name: Create feature branch
run: |
BRANCH_NAME="auto-bump-${{ steps.new_version.outputs.version }}"
git checkout -b $BRANCH_NAME
echo "branch=$BRANCH_NAME" >> $GITHUB_ENV

- name: Bump version
run: |
python ci/bump_version.py --version "${{ steps.new_version.outputs.version }}"

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

- name: Commit changes
run: |
git add -A
git commit -m "chore: bump version to ${{ steps.new_version.outputs.version }}

Automated version bump from ${{ steps.current_version.outputs.version }} to ${{ steps.new_version.outputs.version }}.
Bump type: ${{ needs.check-for-changes.outputs.bump_type }}"

- name: Push changes
run: |
git push origin ${{ env.branch }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.branch }}
base: main
title: "chore: bump version to ${{ steps.new_version.outputs.version }}"
body: |
## Automated Version Bump

This PR automatically bumps the version from `${{ steps.current_version.outputs.version }}` to `${{ steps.new_version.outputs.version }}`.

### Details
- **Bump Type:** ${{ needs.check-for-changes.outputs.bump_type }}
- **Triggered By:** Manual trigger

### Checklist
- [ ] Review version bump changes
- [ ] Verify pom.xml is updated
- [ ] Confirm CI checks pass

### Next Steps
After merging this PR, you can create a release by:
1. Going to Actions → Create Release workflow
2. Selecting the release channel (stable/preview)
3. Running the workflow

---
*This PR was automatically generated by the auto-bump workflow.*
labels: |
version-bump
automated
assignees: ${{ github.actor }}

- name: Summary
run: |
echo "## Version Bump PR Created" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Current Version:** ${{ steps.current_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "- **New Version:** ${{ steps.new_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "- **Bump Type:** ${{ needs.check-for-changes.outputs.bump_type }}" >> $GITHUB_STEP_SUMMARY
echo "- **Branch:** ${{ env.branch }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ Pull request created successfully!" >> $GITHUB_STEP_SUMMARY
82 changes: 82 additions & 0 deletions .github/workflows/flink.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Flink

on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
paths-ignore:
- 'docs/**'
- 'README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: "maven"
- name: Check code style
run: make lint

build:
name: Build
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: "maven"
- name: Build
run: make install

test:
name: Test
runs-on: ubuntu-24.04
timeout-minutes: 30
needs: build
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: "maven"
- name: Run tests
run: make test
Loading