Skip to content

PyPI Nightly Build #180

PyPI Nightly Build

PyPI Nightly Build #180

Workflow file for this run

name: PyPI Nightly Build
on:
schedule:
# Run daily at 6:00 AM UTC+8
- cron: '0 22 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
publish-test-pypi:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --frozen --no-default-groups --group dev
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install JavaScript dependencies
run: cd dashboard && npm ci
- name: Build dashboard
run: cd dashboard && npm run build
- name: Get current version
id: get_version
run: |
VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Current version: $VERSION"
- name: Create development version
run: |
# Create a dev version with timestamp
TIMESTAMP=$(date +%Y%m%d%H%M%S)
DEV_VERSION="${{ steps.get_version.outputs.version }}.dev$TIMESTAMP"
echo "Creating dev version: $DEV_VERSION"
./scripts/bump_version.sh "$DEV_VERSION"
- name: Build package
run: |
uv build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/