Skip to content
Open
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
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
paths:
- "src/**"
- "scripts/generate.py"

# Allow manual re-generation of all packs from the Actions tab
workflow_dispatch:
Expand All @@ -19,8 +20,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Regenerate packs/*.json and index.json
run: python3 scripts/generate.py
run: python scripts/generate.py

- name: Commit generated files
run: |
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Validate packs

on:
pull_request:
paths:
- "src/**"
- "scripts/generate.py"

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Validate all packs
run: python scripts/generate.py --validate-only
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,28 @@ When a PR is merged to main:

> [!NOTE]
> You never need to trigger publishing manually. Merging your PR is all it takes — CI handles the rest.

## Deprecating or Removing a Pack

### Deprecation

To mark a pack as deprecated, add the following fields to the `[pack]` section of its `pack.toml`:

```toml
[pack]
# ... existing fields ...
deprecated = true
deprecated_message = "Use the new-pack pack instead" # optional
```

On merge, CI propagates the `deprecated` flag to `packs/{name}.json` and `index.json`. The pack remains installable but `weave search` and `weave list` will mark it as deprecated.

### Removal

To remove a pack entirely:

1. Delete the `src/{name}/` directory
2. Open a PR — on merge, CI deletes the orphaned `packs/{name}.json` and regenerates `index.json` without the pack

> [!WARNING]
> Removal is permanent. Prefer deprecation unless the pack has a security issue or policy violation.
Loading