Skip to content

Commit 69f291e

Browse files
committed
docs(deployment): add deployment tagging workflow to setup guide
1 parent e0dc1de commit 69f291e

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

packages/deployment/docs/DeploymentSetup.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,66 @@ export ARBISCAN_API_KEY=$(npx hardhat keystore get ARBISCAN_API_KEY)
158158
npx hardhat deploy --skip-prompts --network arbitrumSepolia --tags <deploy-tag>
159159
```
160160

161+
## Tagging Deployments (WIP)
162+
163+
> This convention is a work in progress — feedback and changes welcome.
164+
165+
After a deployment is committed, create an annotated git tag to record the deployment.
166+
Tags use `deploy/{mainnet|testnet}/YYYY-MM-DD` format. The annotation is auto-generated
167+
from address book diffs, listing which contracts changed.
168+
169+
**Requires:** `jq` (`sudo apt install jq` / `brew install jq`)
170+
171+
### Usage
172+
173+
```bash
174+
# Preview first
175+
./scripts/tag-deployment.sh \
176+
--deployer "packages/deployment --tags rewards-manager" \
177+
--network arbitrumSepolia \
178+
--base main \
179+
--dry-run
180+
181+
# Create the tag
182+
./scripts/tag-deployment.sh \
183+
--deployer "packages/deployment --tags rewards-manager" \
184+
--network arbitrumSepolia \
185+
--base main
186+
187+
# Push
188+
git push origin deploy/testnet/2026-03-02
189+
```
190+
191+
The `--deployer` argument is free-form — describe what performed the deployment:
192+
193+
- `"packages/deployment --tags rewards-manager,subgraph-service"`
194+
- `"packages/horizon ignition migrate"`
195+
- `"manual: forge script DeployFoo"`
196+
197+
### Workflow
198+
199+
1. Deploy contracts and update address books
200+
2. Commit the address book changes
201+
3. Run `tag-deployment.sh` (tag must point to a finalized commit)
202+
4. Push branch and tag
203+
204+
### Options
205+
206+
| Option | Description |
207+
| ------------------- | --------------------------------------------- |
208+
| `--deployer <desc>` | What performed the deployment (required) |
209+
| `--network <name>` | `arbitrumOne` or `arbitrumSepolia` (required) |
210+
| `--base <ref>` | Git ref to diff against (default: `HEAD~1`) |
211+
| `--dry-run` | Preview without creating tag |
212+
| `--sign` | Force-sign the tag with `-s` |
213+
214+
### Viewing tags
215+
216+
```bash
217+
git tag -l 'deploy/*' # List all deployment tags
218+
git show --no-patch deploy/testnet/... # View tag annotation
219+
```
220+
161221
## See Also
162222

163223
- [LocalForkTesting.md](./LocalForkTesting.md) - Fork-based testing workflow

0 commit comments

Comments
 (0)