diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8f510a7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,69 @@ +name: Python uv Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write # required for GitHub Release + id-token: write # required for PyPI Trusted Publishing + actions: write # required for tag deletion + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Sync dependencies + run: uv sync + + - name: Run tests + id: test + continue-on-error: true + run: uv run pytest + + - name: Delete tag on failure + if: steps.test.conclusion == 'failure' + run: | + echo "Tests failed. Deleting tag ${GITHUB_REF#refs/tags/}..." + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git push --delete origin ${GITHUB_REF#refs/tags/} + exit 1 + + - name: Build package + run: uv build + + - name: Build changelog + id: gen_changelog + uses: mikepenz/release-changelog-builder-action@v5 + with: + failOnError: "true" + configuration: .github/workflows/release_config.json + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish release on GitHub + uses: softprops/action-gh-release@v1 + with: + files: dist/* + body: ${{ steps.gen_changelog.outputs.changelog }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to PyPI via Trusted Publishing + run: uv publish diff --git a/.github/workflows/release_config.json b/.github/workflows/release_config.json new file mode 100644 index 0000000..b5c387c --- /dev/null +++ b/.github/workflows/release_config.json @@ -0,0 +1,65 @@ +{ + "categories": [ + { + "title": "## ✨ Release", + "labels": [ + "release" + ] + }, + { + "title": "## 🚀 Features", + "labels": [ + "kind/feature", + "enhancement" + ] + }, + { + "title": "## 🐛 Fixes", + "labels": [ + "fix", + "bug" + ] + }, + { + "title": "## ♻️ Refactoring", + "labels": [ + "refactoring" + ] + }, + { + "title": "## ⚡️ Performance Improvements", + "labels": [ + "performance" + ] + }, + { + "title": "## \uD83D\uDCDA Documentation", + "labels": [ + "documentation", + "doc" + ] + }, + { + "title": "## \uD83D\uDEA6 Tests", + "labels": [ + "test" + ] + }, + { + "title": "## \uD83D\uDEE0 Other Updates", + "labels": [ + "other", + "kind/dependency-change" + ] + }, + { + "title": "## 🚨 Breaking Changes", + "labels": [ + "breaking" + ] + } + ], + "ignore_labels": [ + "ignore" + ] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index aa9e7d0..d8e97a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,15 +10,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Input path validation in CLI main function to check if the provided input path exists - Logger import for better error handling and logging capabilities +- Comprehensive system package requirements documentation in README.md +- Platform-specific installation instructions for Ubuntu/Debian, Fedora/RHEL/CentOS, and macOS +- Enhanced error reporting in command execution helper with detailed error output logging +- Support for multiple Python version managers (pyenv, conda, asdf) in base interpreter detection ### Changed - Improved CLI error handling with proper logging when input path does not exist - Test configuration updates: - Removed unused app import from conftest.py - Updated test_cli_call_symbol_table to use verbose flag (-v) instead of --quiet flag +- Improved virtual environment creation error handling with informative error messages +- Enhanced `_get_base_interpreter()` method with robust Python interpreter detection across different environments +- Updated README.md with detailed prerequisite packages including development tools and Python headers ### Fixed - CLI now properly exits with error code 1 when input path doesn't exist instead of proceeding with invalid path +- Virtual environment creation issues on systems missing python3-venv package +- Type safety issues in subprocess command execution by ensuring all arguments are strings +- Cross-platform compatibility for Python interpreter detection ## [0.1.0] - Initial Release @@ -32,4 +42,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Caching system with configurable cache directory - Output artifacts in JSON format - Verbosity controls for logging -- Eager/lazy analysis modes \ No newline at end of file +- Eager/lazy analysis modes