[core] tests: add tests for base_query #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI - garf-core | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'libs/core/**' | |
| - '!libs/core/**/*.md' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Get versions and check for change | |
| id: version_check | |
| run: | | |
| PREV_VERSION=$(git show HEAD~1:libs/core/garf_core/__init__.py | grep -oE "__version__ = '([0-9]+\.[0-9]+\.[0-9]+)'" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | |
| CURRENT_VERSION=$(grep -oE "__version__ = '([0-9]+\.[0-9]+\.[0-9]+)'" libs/core/garf_core/__init__.py | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | |
| if [[ "$CURRENT_VERSION" != "$PREV_VERSION" ]]; then | |
| echo "Version change detected: $PREV_VERSION -> $CURRENT_VERSION" | |
| echo "should_publish=true" >> $GITHUB_OUTPUT | |
| echo "new_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT | |
| else | |
| echo "No version change. Skipping publish." | |
| echo "should_publish=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build the package | |
| if: steps.version_check.outputs.should_publish == 'true' | |
| run: uv build backend | |
| - name: Publish to PyPI | |
| if: steps.version_check.outputs.should_publish == 'true' | |
| run: uv publish backend/dist/* | |
| - name: Create Git Tag | |
| if: steps.version_check.outputs.should_publish == 'true' | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git tag v${{ steps.version_check.outputs.new_version }}-core | |
| git push origin v${{ steps.version_check.outputs.new_version }}-core |