ec436095dd
Book-CI / test (macos-latest) (push) Has been cancelled
Book-CI / test (ubuntu-latest) (push) Has been cancelled
Book-CI / test (windows-latest) (push) Has been cancelled
Release Fake Tag / publish (push) Has been cancelled
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
Release to PyPI / Build & publish sglang-kt (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.11) (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.12) (push) Has been cancelled
Release to PyPI / Publish kt-kernel to PyPI (push) Has been cancelled
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Release Fake Tag
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "version.py"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
publish:
|
|
if: github.repository == 'kvcache-ai/ktransformers'
|
|
runs-on: ubuntu-latest
|
|
environment: 'prod'
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: |
|
|
version=$(cat version.py | grep '__version__' | cut -d'"' -f2)
|
|
echo "TAG=v$version" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create and push tag
|
|
run: |
|
|
TAG=${{ steps.get_version.outputs.TAG }}
|
|
git config user.name "ktransformers-bot"
|
|
git config user.email "ktransformers-bot@users.noreply.github.com"
|
|
if git ls-remote --tags --exit-code origin "refs/tags/${TAG}" > /dev/null 2>&1; then
|
|
echo "Tag ${TAG} already exists on origin, skipping."
|
|
exit 0
|
|
fi
|
|
git tag "${TAG}"
|
|
git push origin "${TAG}"
|