Skip to content

Commit

Permalink
sync toml file with release version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alleria1809 committed Jul 7, 2024
1 parent 83e7830 commit 3c4f399
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
- uses: actions/checkout@v3
- name: Validate Tag Format
run: |
run: |
TAG_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\-\.]+)?$'
TAG="${GITHUB_REF/refs\/tags\//}"
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
shell: bash

build-and-test:
needs: validate-tag
Expand Down
32 changes: 5 additions & 27 deletions .github/workflows/test_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ jobs:
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-test:
build-and-package:
needs: validate-tag
runs-on: ubuntu-latest
steps:
Expand All @@ -39,39 +37,19 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run tests
run: |
poetry run pytest
- name: Build the distribution
run: poetry build

dry-run-publish:
needs: build-and-test
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: Build the distribution
run: poetry build
- name: Dry run publish to PyPI
run: poetry publish --dry-run
# This step simulates the publishing process without making actual changes

# The GitHub release creation is commented out to avoid creating releases during tests
# create-github-release:
# needs: dry-run-publish
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Create Release on GitHub
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref_name }}
# release_name: Release ${{ github.ref_name }}
# body: 'Test automated release of version ${{ github.ref_name }}'
# draft: false
# prerelease: false
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[tool.poetry]
name = "lightrag-project"
version = "v0.1.0-alpha.3"
version = "v0.1.0-alpha.4"
description = "A project to develop and test the lightrag library"
authors = ["Your Name <your.email@example.com>"]
license = "MIT"
Expand Down

0 comments on commit 3c4f399

Please sign in to comment.