fix: fix missing dependencies #27
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: Release Workflow | |
| on: | |
| push: | |
| branches: | |
| - main-workable | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install AWS SAM CLI | |
| run: pip install aws-sam-cli | |
| - name: Pre-install dependencies for Lambda compatibility | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --platform manylinux2014_x86_64 --only-binary=all --no-binary=none pydantic-core | |
| pip install --platform manylinux2014_x86_64 --only-binary=all --no-binary=none pydantic | |
| - name: Build with SAM | |
| run: | | |
| sam build --use-container | |
| echo "Checking for compiled extensions..." | |
| find .aws-sam/build -name "*.so" -exec file {} \; | |
| - name: Zip the contents | |
| id: zip | |
| run: | | |
| release_suffix=$(date -u +"%Y%m%d%H%M") | |
| echo "release_suffix=${release_suffix}" >> $GITHUB_OUTPUT | |
| zip_name="apache-iceberg-monitoring-${release_suffix}.zip" | |
| cd .aws-sam/build/IcebergMetricsLambda | |
| find . -name "tests" -type d -exec rm -rf {} + 2>/dev/null || true | |
| find . -name "*.so" -exec strip {} \; 2>/dev/null || true | |
| zip -9 -r "../../../${zip_name}" . | |
| echo "zip_name=${zip_name}" >> $GITHUB_OUTPUT | |
| - name: Create Release and Upload Asset (gh CLI) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Create the release | |
| gh release create "apache-iceberg-monitoring-${{ steps.zip.outputs.release_suffix }}" \ | |
| --title "apache-iceberg-monitoring-${{ steps.zip.outputs.release_suffix }}" \ | |
| --target ${{ github.sha }} \ | |
| ./${{ steps.zip.outputs.zip_name }} |