bloque-ci-github
GitHub Actions workflow generator for Python + TypeScript monorepos.
Generates CI (lint + test) and release/publish (PyPI + npm) workflows programmatically using dict-to-YAML, making them round-trip testable and IDE-friendly.
Install
uv add bloque-ci-github
Quick Start
Generate a CI workflow
from bloque_ci_github.generators import generate_ci_workflow
from bloque_ci_github.serializer import write_workflow
# Default: matches a standard Python + TypeScript monorepo CI
workflow = generate_ci_workflow()
write_workflow(workflow, ".github/workflows/ci.yml")
Generate a release workflow
from bloque_ci_github.generators import generate_release_workflow
from bloque_ci_github.models import PublishConfig
from bloque_ci_github.serializer import write_workflow
workflow = generate_release_workflow(
publish_python=PublishConfig(target="pypi"),
publish_typescript=PublishConfig(target="npm"),
)
write_workflow(workflow, ".github/workflows/release.yml")
Customize jobs
from bloque_ci_github.generators import generate_ci_workflow
from bloque_ci_github.models import PythonJobConfig, WorkflowConfig
config = WorkflowConfig(
name="CI",
triggers=["push", "pull_request"],
python=PythonJobConfig(
run_format_check=True,
python_version="3.13",
),
typescript=None, # Skip TypeScript job
)
workflow = generate_ci_workflow(config)
Validate
from bloque_ci_github.validate import validate_config, validate_workflow_yaml
from bloque_ci_github.models import WorkflowConfig
from bloque_ci_github.serializer import workflow_to_yaml
from bloque_ci_github.generators import generate_ci_workflow
# Validate config before generation
result = validate_config(WorkflowConfig())
assert result.valid
# Validate generated YAML structure
yaml_str = workflow_to_yaml(generate_ci_workflow())
result = validate_workflow_yaml(yaml_str)
assert result.valid
API
Models
PythonJobConfig- Python CI job settings (version, test/lint/format commands)TypeScriptJobConfig- TypeScript CI job settings (node version, lint/build/test)PublishConfig- Publish target config (PyPI or npm, secret names)WorkflowConfig- Top-level workflow config (name, triggers, jobs)
Generators
generate_ci_workflow(config?)- CI workflow with lint + test jobsgenerate_release_workflow(publish_python?, publish_typescript?, trigger_tag_pattern?)- Release workflow with publish jobs
Serializer
workflow_to_yaml(workflow)- Dict to clean YAML stringwrite_workflow(workflow, path)- Write workflow to .yml file
Validation
validate_config(config)- Check config has at least one jobvalidate_workflow_yaml(yaml_content)- Check YAML has valid GitHub Actions structure
Examples
Ready-to-use workflow files in the examples/ directory:
ci.yml- Standard CI for Python + TypeScript monoreporelease-python.yml- Tag-triggered release to PyPIrelease-typescript.yml- Tag-triggered release to npm
Metadata
Release files for ulfblk-ci-github 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ulfblk_ci_github-0.1.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ulfblk_ci_github-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / ulfblk_ci_github-0.1.0.tar.gz
| Download URL | ulfblk_ci_github-0.1.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50cf7d0a4d8eba1bf5fa7551e91791a3d3079a2a8d538c893048717ad60b4fc2
|
|
BLAKE2b-256 checksum How to use checksums |
4e3f4011326e03923105cab59b642fe0f8ba466826fb5a2a8df1d2c16782b758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ulfblk_ci_github-0.1.0-py3-none-any.whl
| Download URL | ulfblk_ci_github-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15600134bc949485fa1023559182b454ec90389f64230005163c3edd76601912
|
|
BLAKE2b-256 checksum How to use checksums |
13377c93b4a2a8e04901e21755971b5bb34c1593937360b8b00dd8c16810f923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|