GitHub Actions workflow generator: CI pipelines, release/publish workflows for Python and TypeScript monorepos
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ulfblk_ci_github-0.1.0.tar.gz.
File metadata
- Download URL: ulfblk_ci_github-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50cf7d0a4d8eba1bf5fa7551e91791a3d3079a2a8d538c893048717ad60b4fc2
|
|
| MD5 |
b8e92822a8941a1ff1fd19701cea565e
|
|
| BLAKE2b-256 |
4e3f4011326e03923105cab59b642fe0f8ba466826fb5a2a8df1d2c16782b758
|
File details
Details for the file ulfblk_ci_github-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ulfblk_ci_github-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15600134bc949485fa1023559182b454ec90389f64230005163c3edd76601912
|
|
| MD5 |
fb37fb5a25852bf843260eaad931e9dd
|
|
| BLAKE2b-256 |
13377c93b4a2a8e04901e21755971b5bb34c1593937360b8b00dd8c16810f923
|