Shared release tooling for aware-cli bundles and companion automation.
Project description
aware-release
aware-release packages the release automation used by aware-cli, Studio, and pipeline tooling. It assembles bundle artefacts, generates manifests, and publishes archives through a consistent, schema-validated interface.
Install
pip install aware-release
The CLI executable aware-release is added to your PATH. The library targets Python 3.12+.
Features
- Build aware-cli bundle directories and archives (zip/tar) without baking a virtualenv.
- Generate manifest metadata backed by Pydantic models for deterministic validation.
- Provide publishing adapters (command, GitHub Releases, S3) that emit structured receipts.
- Supply helper workflows for rule versioning so CLI bundles ship with current documentation.
Quick Start
Run the bundled CLI help to explore subcommands:
aware-release --help
aware-release bundle --help
Bundle an aware-cli wheel:
aware-release bundle \
--channel dev \
--version 0.1.0 \
--platform linux-x86_64 \
--wheel dist/aware_cli-0.1.0-py3-none-any.whl
Generate publish metadata (dry-run by default):
aware-release publish \
--manifest releases/dev/0.1.0/linux-x86_64/manifest.json \
--archive releases/dev/0.1.0/linux-x86_64/bundle.tar.gz \
--adapter command \
--adapter-command "echo upload {archive}"
Python Usage
from pathlib import Path
from aware_release.bundle.builder import BundleBuilder, BundleConfig
builder = BundleBuilder()
config = BundleConfig(
channel="dev",
version="0.1.0",
platform="linux-x86_64",
source_wheels=[Path("dist/aware_cli-0.1.0-py3-none-any.whl")],
output_dir=Path("releases"),
)
bundle_path = builder.build(config)
print(bundle_path)
Rule Version Automation
aware-release rules render \
--rules-root docs/rules \
--manifest build/rule-manifest.json
This wrapper regenerates rule versions (mirroring aware-cli docs render --target rules --write-version) and emits a manifest for downstream packaging.
CI / Tests
Run the test suite with:
uv run --project tools/release pytest
Changelog
See CHANGELOG.md for release notes.
License
MIT © 2025 AWARE
All commands emit structured JSON for automation pipelines.
## Rule version automation
aware-cli owns rule rendering, so every release pipeline should regenerate the versioned rule set before building bundles. The new `--write-version` workflow turns templates into versioned/current copies and emits a manifest for downstream packaging.
Minimal example (run inside the aware repository):
```bash
export AWARE_RULES_ROOT=${AWARE_RULES_ROOT:-docs/rules}
CLI_VERSION=$(uv run --project tools/cli python -c "import aware_cli; print(aware_cli.__version__)")
# Iterate over the rule ids we ship (list_rules() may be used for automation)
for rule_id in 02-task-01-lifecycle 02-task-03-change-tracking 04-agent-01-memory-hierarchy; do
uv run --project tools/cli aware-cli docs render \
--target rules \
--rule "$rule_id" \
--write-version \
--cli-version "$CLI_VERSION" \
--rules-root "$AWARE_RULES_ROOT" \
--update-current copy \
--json-output build/rule-manifest.json
done
The above command:
- Loads each template from
$AWARE_RULES_ROOT/templates/<rule>.mdand renders fresh fragments. - Writes versioned copies under
$AWARE_RULES_ROOT/versions/<cli-version>/with frontmatter containingaware_cli_version,generated_at, andsource_template. - Copies the version into
$AWARE_RULES_ROOT/current/(use--update-current symlinkif the platform supports symlinks). - Appends a JSON manifest entry to
build/rule-manifest.json; the release scripts can read this manifest to stage artefacts or publish alongside the bundle.
For more dynamic pipelines, you can gather rule identifiers programmatically:
uv run --project tools/cli python - <<'PY'
from aware_cli.objects.rule.meta import list_rules
for rule in list_rules():
print(rule.id)
PY
Always regenerate rules before invoking aware-release bundle so the archive includes up-to-date rules/versions/<cli-version> and rules/current. External consumers (e.g., aware-sdk) can call the same CLI command by pointing --rules-root at their unpacked package data.
To trigger the regeneration workflow from automation, use the release-pipeline registry slug:
uv run --project tools/release-pipeline release-pipeline workflow trigger \
--workflow cli-rules-version \
--dry-run
You can also invoke rule regeneration directly via the pipeline helper:
```bash
uv run --project tools/release-pipeline release-pipeline rules render \
--rules-root docs/rules \
--manifest build/rule-manifest.json
The corresponding GitHub Actions workflow lives at `.github/workflows/cli-rules-version.yml` and uploads the refreshed manifest and rule directories as artefacts.
## Contributing
- Keep code/tests/docs aligned per `docs/BEST_PRACTICES.md`.
- Update `CHANGELOG.md` whenever modifying public APIs.
- Run `uv run pytest` before submitting changes.
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 Distributions
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 aware_release-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aware_release-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bdf9ed07e18458fec4ea36c05203b17be0ce6a86aca9e8362645ebcd7d5ca12
|
|
| MD5 |
8203deea4c8c767abbb3550d522a657d
|
|
| BLAKE2b-256 |
9dcbe0fbd5d1bfd25f2cdce71a0ba1201c465a1762308e0f690a9d2f38175689
|
Provenance
The following attestation bundles were made for aware_release-0.1.1-py3-none-any.whl:
Publisher:
publish-aware-release.yml on aware-network/aware
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aware_release-0.1.1-py3-none-any.whl -
Subject digest:
5bdf9ed07e18458fec4ea36c05203b17be0ce6a86aca9e8362645ebcd7d5ca12 - Sigstore transparency entry: 641409436
- Sigstore integration time:
-
Permalink:
aware-network/aware@1c3585ac2de2b8822094461f25e778dbcc855cd3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aware-network
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-aware-release.yml@1c3585ac2de2b8822094461f25e778dbcc855cd3 -
Trigger Event:
workflow_dispatch
-
Statement type: