Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,48 @@ jobs:
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Run tests
run: pytest -q

release-candidate:
needs: pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Build release candidate
run: python -m pip install --upgrade pip build && rm -rf dist && python -m build --wheel
- name: Verify release candidate bytes and package identity
run: |
python - <<'PY'
import hashlib
import json
import zipfile
from pathlib import Path

release = json.loads(Path("docs/releases/0.0.1rc1.json").read_text(encoding="utf-8"))
artifact = release["artifact"]
wheel = Path("dist") / artifact["filename"]
assert wheel.is_file(), wheel
assert wheel.stat().st_size == artifact["size_bytes"]
assert hashlib.sha256(wheel.read_bytes()).hexdigest() == artifact["sha256"]

with zipfile.ZipFile(wheel) as archive:
metadata_name = next(name for name in archive.namelist() if name.endswith(".dist-info/METADATA"))
metadata = archive.read(metadata_name).decode("utf-8")
version = next(line.split(": ", 1)[1] for line in metadata.splitlines() if line.startswith("Version: "))
manifest_bytes = archive.read("hermes_workflows/plugin_payload_manifest.v1.json")

assert version == release["version"]
manifest = json.loads(manifest_bytes)
expected_manifest = dict(release["package_resource_manifest"])
identity = expected_manifest.pop("identity")
assert manifest == expected_manifest
assert identity == "sha256:" + hashlib.sha256(manifest_bytes).hexdigest()
PY
- uses: actions/upload-artifact@v6
with:
name: hermes-workflows-0.0.1rc1-${{ github.sha }}
path: dist/hermes_workflows-0.0.1rc1-py3-none-any.whl
if-no-files-found: error
retention-days: 90
36 changes: 36 additions & 0 deletions docs/releases/0.0.1rc1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"artifact": {
"filename": "hermes_workflows-0.0.1rc1-py3-none-any.whl",
"immutable_url": "https://github.com/skylarbpayne/hermes-workflows/releases/download/v0.0.1rc1/hermes_workflows-0.0.1rc1-py3-none-any.whl",
"sha256": "9995dfcdfbb05057d21401896d94f3fdc9e89891f18fe6f6f6097c616e595ba2",
"size_bytes": 183555
},
"base_sha": "d99da904455a33a0406062289cad5ce5cea17fe2",
"consumes": {
"fnd_pkg": "e1e7a09e0c52702b4ab93e9a70520fd5ede4f9e3",
"fnd_regloc": "ad9e83091d72cab2f79b8324944d1dea4b740951"
},
"package_resource_manifest": {
"files": [],
"identity": "sha256:8c7dc41504681d7acdc0b1a9e085e99fb4445c2e5440e6ea29077fb599aec3fc",
"owner_id": "hermes-workflows",
"package_name": "hermes-workflows",
"package_version": "0.0.1rc1",
"payload_root": "plugin_payload",
"schema_version": 1
},
"release_tag": "v0.0.1rc1",
"rollback": {
"artifact_bytes_replaced": false,
"strategy": "Revert the release metadata PR; if the artifact is bad, publish a new version. Never replace bytes at v0.0.1rc1."
},
"runtime_mutation_receipt": {
"database": false,
"palmer_repository": false,
"profile": false,
"registry": false,
"service": false
},
"schema_version": 1,
"version": "0.0.1rc1"
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hermes-workflows"
version = "0.0.1"
version = "0.0.1rc1"
description = "Code-first durable workflows for agent work, typed Review Queues, Workflow Workers, and receipts."
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion src/hermes_workflows/plugin_payload_manifest.v1.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":[],"owner_id":"hermes-workflows","package_name":"hermes-workflows","package_version":"0.0.1","payload_root":"plugin_payload","schema_version":1}
{"files":[],"owner_id":"hermes-workflows","package_name":"hermes-workflows","package_version":"0.0.1rc1","payload_root":"plugin_payload","schema_version":1}