Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
dotnet-build-and-test / paths-filter (push) Waiting to run
dotnet-build-and-test / dotnet-build-and-test (Debug, windows-latest, net9.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, integration, true, ubuntu-latest, net10.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, integration, true, windows-latest, net472) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, ubuntu-latest, net8.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test-check (push) Blocked by required conditions
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
name: Python - Build Release Assets
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
env:
|
|
# Configure a constant location for the uv cache
|
|
UV_CACHE_DIR: /tmp/.uv-cache
|
|
|
|
jobs:
|
|
python-build-assets:
|
|
if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'python-')
|
|
name: Python Build Assets and add to Release
|
|
runs-on: ubuntu-latest
|
|
environment: "integration"
|
|
env:
|
|
UV_PYTHON: "3.13"
|
|
defaults:
|
|
run:
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up python and install the project
|
|
id: python-setup
|
|
uses: ./.github/actions/python-setup
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
os: ${{ runner.os }}
|
|
env:
|
|
# Configure a constant location for the uv cache
|
|
UV_CACHE_DIR: /tmp/.uv-cache
|
|
- name: Set environment variables
|
|
run: |
|
|
# Extract package name from tag (format: python-<package>-<version>)
|
|
TAG="${{ github.event.release.tag_name }}"
|
|
PACKAGE=$(echo "$TAG" | sed 's/^python-\([^-]*\)-.*$/\1/')
|
|
|
|
# Validate package exists
|
|
if [[ ! -d "packages/$PACKAGE" ]]; then
|
|
echo "Error: Package '$PACKAGE' not found in packages/ directory"
|
|
echo "Available packages: $(ls packages/)"
|
|
exit 1
|
|
fi
|
|
|
|
echo "PACKAGE=$PACKAGE" >> $GITHUB_ENV
|
|
echo "Building package: $PACKAGE"
|
|
|
|
- name: Check version
|
|
run: |
|
|
echo "Building and uploading Python package version: ${{ github.event.release.tag_name }}"
|
|
echo "Package directory: packages/${{ env.PACKAGE }}"
|
|
- name: Build the package
|
|
run: uv run poe --directory packages/${{ env.PACKAGE }} build
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
python/dist/*
|