Skip to content

Test Release to TestPyPI #1

Test Release to TestPyPI

Test Release to TestPyPI #1

Workflow file for this run

name: Test Release to TestPyPI
on:
workflow_dispatch:
jobs:
test-release:
name: Build and Release to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write # Required for trusted publishing
steps:
- uses: actions/checkout@v4
# Build UI
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
- name: Build UI
run: |
cd ui
pnpm install --frozen-lockfile
pnpm build
# Build Python package (includes ui/dist as disk_tree/static)
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Build wheel
run: uv build
- name: Show build artifacts
run: |
ls -lh dist/
echo "--- Wheel contents ---"
python -c "import zipfile; z = zipfile.ZipFile('dist/disk_tree-0.1.0-py3-none-any.whl'); [print(f) for f in z.namelist() if 'static' in f]"
echo "--- Tarball size check ---"
tar -tzf dist/*.tar.gz | wc -l
# Publish to TestPyPI using trusted publishing
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/