Skip to content

v0.6.3

v0.6.3 #28

Workflow file for this run

name: Publishing
on:
release:
types: [published]
jobs:
release-build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python 3.12
run: uv python install 3.12
- name: Install dependencies
run: uv sync --frozen --all-extras --dev --python 3.12
- name: Build package
run: uv build
- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
live-google-integration:
name: Live Google integration tests
runs-on: ubuntu-latest
needs: release-build
env:
RUN_GOOGLE_INTEGRATION: "1"
DRIVE_FOLDER_ID: ${{ secrets.GOOGLE_DRIVE_FOLDER_ID }}
CREDENTIALS_CONFIG: ${{ secrets.GOOGLE_CREDENTIALS_CONFIG }}
GOOGLE_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
GOOGLE_TEST_SHARE_EMAIL: ${{ secrets.GOOGLE_TEST_SHARE_EMAIL }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python 3.12
run: uv python install 3.12
- name: Install dependencies
run: uv sync --frozen --python 3.12
- name: Prepare Google credentials
run: |
if [ -n "$GOOGLE_SERVICE_ACCOUNT_JSON" ]; then
service_account_path="$RUNNER_TEMP/google-service-account.json"
printf '%s' "$GOOGLE_SERVICE_ACCOUNT_JSON" > "$service_account_path"
echo "SERVICE_ACCOUNT_PATH=$service_account_path" >> "$GITHUB_ENV"
fi
if [ -z "$DRIVE_FOLDER_ID" ]; then
echo "GOOGLE_DRIVE_FOLDER_ID secret is required." >&2
exit 1
fi
if [ -z "$GOOGLE_SERVICE_ACCOUNT_JSON" ] && [ -z "$CREDENTIALS_CONFIG" ]; then
echo "Set either GOOGLE_SERVICE_ACCOUNT_JSON or GOOGLE_CREDENTIALS_CONFIG." >&2
exit 1
fi
- name: Run live Google integration tests
run: uv run --python 3.12 python -m unittest tests.test_google_integration
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs:
- release-build
- live-google-integration
permissions:
id-token: write # For trusted publishing
steps:
- name: Download release dists
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1