Skip to content

Commit add2eb7

Browse files
committed
Refactor release workflows to use gh release create for asset uploads and update README for clarity on release processes
1 parent 4092a30 commit add2eb7

6 files changed

Lines changed: 52 additions & 34 deletions

File tree

.github/workflows/release-candidate.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,20 @@ jobs:
6161
print-hash: true
6262

6363
- name: Create GitHub prerelease
64-
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
65-
with:
66-
tag_name: ${{ github.ref_name }}
67-
name: Release Candidate ${{ github.ref_name }}
68-
prerelease: true
69-
generate_release_notes: true
70-
files: |
71-
dist/*
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
run: |
67+
set -euo pipefail
68+
shopt -s nullglob
69+
files=(dist/*.tar.gz dist/*.whl dist/*.publish.attestation)
70+
71+
if [ "${#files[@]}" -eq 0 ]; then
72+
echo "No release assets found in dist/." >&2
73+
exit 1
74+
fi
75+
76+
gh release create "${GITHUB_REF_NAME}" "${files[@]}" \
77+
--repo "${GITHUB_REPOSITORY}" \
78+
--title "Release Candidate ${GITHUB_REF_NAME}" \
79+
--generate-notes \
80+
--prerelease

.github/workflows/release-pypi.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,19 @@ jobs:
6161
print-hash: true
6262

6363
- name: Create GitHub release
64-
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
65-
with:
66-
tag_name: ${{ github.ref_name }}
67-
name: ${{ github.ref_name }}
68-
generate_release_notes: true
69-
files: |
70-
dist/*
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
run: |
67+
set -euo pipefail
68+
shopt -s nullglob
69+
files=(dist/*.tar.gz dist/*.whl dist/*.publish.attestation)
70+
71+
if [ "${#files[@]}" -eq 0 ]; then
72+
echo "No release assets found in dist/." >&2
73+
exit 1
74+
fi
75+
76+
gh release create "${GITHUB_REF_NAME}" "${files[@]}" \
77+
--repo "${GITHUB_REPOSITORY}" \
78+
--title "${GITHUB_REF_NAME}" \
79+
--generate-notes

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Agent Hooks
22

33
<p align="center">
4-
<img src="docs/assets/agent-hooks-landing.svg" alt="Agent Hooks landing graphic" width="100%">
4+
<img src="https://www.zhu424.dev/agent-hooks/latest/assets/agent-hooks-landing.svg" alt="Agent Hooks landing graphic" width="100%">
55
</p>
66

77
**No more swipe-and-sweep context switching for multi-session AI coding.**
@@ -12,13 +12,13 @@ Agent Hooks gives Claude Code and Codex one local callback layer: a macOS-ready
1212

1313
### Claude Code
1414

15-
![Claude Code permission request shown as a macOS dialog](docs/assets/agent-hooks-claude-code-example.png)
15+
![Claude Code permission request shown as a macOS dialog](https://www.zhu424.dev/agent-hooks/latest/assets/agent-hooks-claude-code-example.png)
1616

1717
Claude Code permission requests become a native local dialog with `Deny`, `Allow Once`, and session-scoped `Always Allow`.
1818

1919
### Codex
2020

21-
![Codex permission request shown as a macOS dialog](docs/assets/agent-hooks-codex-example.png)
21+
![Codex permission request shown as a macOS dialog](https://www.zhu424.dev/agent-hooks/latest/assets/agent-hooks-codex-example.png)
2222

2323
Codex `PreToolUse` requests become the same local dialog flow, with `Deny`, `Allow Once`, and optional `execpolicy` short-circuiting for already-allowed Bash commands.
2424

@@ -215,21 +215,21 @@ This is enough to route Codex Bash permission checks and stop notifications into
215215

216216
Recommended setup: pass `--provider` explicitly in your provider config when you can. The built-in callback can infer providers from payload markers, but the explicit flag keeps local setup easier to reason about and debug.
217217

218-
If you want to build your own hook app, start with [`AgentHook`](docs/framework/agenthook.md) and then run it with [`agent-hooks run`](docs/cli/custom-apps.md).
218+
If you want to build your own hook app, start with [`AgentHook`](https://www.zhu424.dev/agent-hooks/latest/framework/agenthook/) and then run it with [`agent-hooks run`](https://www.zhu424.dev/agent-hooks/latest/cli/custom-apps/).
219219

220220
## Docs Map
221221

222-
- [Features](docs/features.md)
223-
- [macOS Quickstart](docs/getting-started/macos-quickstart.md)
224-
- [Built-in Callback](docs/cli/builtin-callback.md)
225-
- [AgentHook](docs/framework/agenthook.md)
226-
- [Architecture Overview](docs/architecture/overview.md)
227-
- [Claude Code](docs/providers/claude-code.md)
228-
- [Codex](docs/providers/codex.md)
222+
- [Features](https://www.zhu424.dev/agent-hooks/latest/features/)
223+
- [macOS Quickstart](https://www.zhu424.dev/agent-hooks/latest/getting-started/macos-quickstart/)
224+
- [Built-in Callback](https://www.zhu424.dev/agent-hooks/latest/cli/builtin-callback/)
225+
- [AgentHook](https://www.zhu424.dev/agent-hooks/latest/framework/agenthook/)
226+
- [Architecture Overview](https://www.zhu424.dev/agent-hooks/latest/architecture/overview/)
227+
- [Claude Code](https://www.zhu424.dev/agent-hooks/latest/providers/claude-code/)
228+
- [Codex](https://www.zhu424.dev/agent-hooks/latest/providers/codex/)
229229

230230
## Maintainers
231231

232-
- [Release Process](scripts/release/README.md)
232+
- [Release Process](https://github.com/jason810496/agent-hooks/blob/main/scripts/release/README.md)
233233

234234
## Scope
235235

@@ -242,4 +242,4 @@ The docs stay aligned with the current implementation. They describe supported b
242242

243243
## License
244244

245-
Agent Hooks is licensed under Apache 2.0. See [LICENSE](LICENSE).
245+
Agent Hooks is licensed under Apache 2.0. See [LICENSE](https://github.com/jason810496/agent-hooks/blob/main/LICENSE).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "agent-hooks"
7-
version = "0.1.0rc1"
7+
version = "0.1.0rc2"
88
description = "One local callback layer for Claude Code and Codex: a macOS-ready CLI for native permission dialogs and notifications, plus a FastAPI-like Python framework"
99
readme = "README.md"
1010
requires-python = ">=3.10"

scripts/release/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Examples:
2424
## Required GitHub Configuration
2525

2626
The workflows use [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/). No API token is required if the publishers are configured correctly.
27-
All third-party GitHub Actions in the release workflows are pinned to full commit SHAs, and the trailing comments record the human-readable release version that each SHA came from.
27+
All third-party GitHub Actions in the release workflows are pinned to full commit SHAs, and the trailing comments record the human-readable release version that each SHA came from. GitHub releases themselves are created with the built-in `gh release create` CLI so immutable releases follow GitHub's draft-upload-publish sequence when assets are attached.
2828

2929
Create these GitHub environments:
3030

@@ -105,7 +105,7 @@ After a local `mike deploy`, run `uv run --group docs mike serve` if you want to
105105
git push origin main --follow-tags
106106
```
107107

108-
6. GitHub Actions publishes the distributions to TestPyPI and creates a GitHub prerelease with the built artifacts attached.
108+
6. GitHub Actions publishes the distributions to TestPyPI and creates a GitHub prerelease with the built artifacts and publish attestations attached.
109109
The docs workflow also publishes versioned docs for `0.2.0rc1` and moves the `rc` docs alias.
110110

111111
Use the TestPyPI install flow to validate the candidate in a clean environment before promoting it.
@@ -136,7 +136,7 @@ Use the TestPyPI install flow to validate the candidate in a clean environment b
136136
git push origin main --follow-tags
137137
```
138138

139-
6. GitHub Actions publishes the package to PyPI and creates the GitHub release with release notes and distribution artifacts.
139+
6. GitHub Actions publishes the package to PyPI and creates the GitHub release with release notes, distribution artifacts, and publish attestations attached.
140140
The docs workflow also publishes immutable versioned docs for `0.2.0` while keeping `latest` reserved for the moving docs built from `main`.
141141

142142
## CI Validation Rules

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)