Skip to content

test version release #10

test version release

test version release #10

name: Test Release Workflow on Release Branch
on:
push:
tags:
- 'v*'
branches:
- release # Change from main to release for testing
jobs:
validate-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate Tag Format
run: |
TAG_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\-\.]+)?$'
echo "Regex to match: $TAG_REGEX"
TAG="${GITHUB_REF/refs\/tags\//}"
echo "Tag extracted: $TAG"
if [[ "$TAG" =~ $TAG_REGEX ]]; then
echo "Tag format is valid."
else
echo "::error::Tag $TAG does not match the 'vMAJOR.MINOR.PATCH' or 'vMAJOR.MINOR.PATCH-pre-release' format."
exit 1
fi
shell: bash
build-and-package:
needs: validate-tag
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12'] # Using the same Python versions as in your test workflow
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
cd lightrag
poetry config virtualenvs.create false
poetry install
# - name: Run tests with pytest
# run: |
# cd lightrag
# poetry run pytest
- name: Build the distribution
run: |
cd lightrag
poetry build
dry-run-publish:
needs: build-and-package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Dry run publish to PyPI
run: |
cd lightrag
poetry publish --dry-run
# This step simulates the publishing process without making actual changes