mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 06:19:57 +00:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Python - Create release commit
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: 'Dry run (create the local commit/tags but do not push it)'
|
|
required: true
|
|
default: "false"
|
|
type: choice
|
|
options:
|
|
- "true"
|
|
- "false"
|
|
part:
|
|
description: 'What kind of release is this?'
|
|
required: true
|
|
default: 'patch'
|
|
type: choice
|
|
options:
|
|
- patch
|
|
- minor
|
|
- major
|
|
|
|
jobs:
|
|
bump-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out main
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: main
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set git configs for bumpversion
|
|
shell: bash
|
|
run: |
|
|
git config user.name 'Lance Release'
|
|
git config user.email 'lance-dev@lancedb.com'
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Bump version, create tag and commit
|
|
working-directory: python
|
|
run: |
|
|
pip install bump2version
|
|
bumpversion --verbose ${{ inputs.part }}
|
|
- name: Push new version and tag
|
|
if: ${{ inputs.dry_run }} == "false"
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}
|
|
branch: main
|
|
tags: true
|
|
|