setup-azd
AGENTS.md11 starsChanged 8 months agoMITView on GitHub
Guidance for Copilot (Chat, CLI, code review) and other AI agents working in the Azure/setup-azd repository. Read this file in its entirety before making changes. Azure/setup-azd is a GitHub Action that installs the Azure Developer CLI (azd) onto a workflow runner. The action is authored in TypeScript under src/, bundled with @vercel/ncc into dist/index.js, and published to the GitHub Marketplace. This is the canonical procedure for cutting a new release. The matching Copilot skill lives at .github/skills/github-action-release/SKILL.md — invoke it…
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- github-action-releaseSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Before bumping any version, pin a consumer pipeline to @main and make sure it passes end-to-end:
- Distinctive: line 45
Ask the user if unsure.
- Distinctive: line 87
After the PR merges to main:
- Distinctive: line 117
Check "Publish this Action to the GitHub Marketplace" and select the same primary/secondary categories as the previous release.
- Distinctive: line 118
Leave "Set as the latest release" checked unless back-porting.
- Distinctive: line 135
When reviewing PRs on this repo, flag any of the following as blockers:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — setup-azd
Guidance for Copilot (Chat, CLI, code review) and other AI agents working in the Azure/setup-azd repository. Read this file in its entirety before making changes.
About this repository
Azure/setup-azd is a GitHub Action that installs the Azure Developer CLI (azd) onto a workflow runner. The action is authored in TypeScript under src/, bundled with @vercel/ncc into dist/index.js, and published to the GitHub Marketplace.
Key files:
| File | Purpose |
action.yml | Action manifest. runs.using controls the Node.js runtime. |
src/main.ts | Action entry point. |
dist/index.js | Bundled output — committed to the repo and must stay in sync with src/. Enforced by .github/workflows/check-dist.yml. |
package.json / package-lock.json | Action version lives here (version field). Must match CHANGELOG. |
CHANGELOG.md | Release history. Append a new section at the top for every release. |
README.md | Marketplace-facing docs. uses: samples use the latest floating major tag. |
General conventions
- Never edit
dist/by hand. Regenerate withnpm run all(ornpm run build && npm run package) and commit the result. - Never pin
uses: Azure/setup-azd@vX.Y.ZinREADME.md. The public samples use the latest floating major tag so users do not have to update docs on every release. - Always rebuild
dist/whensrc/changes. Thecheck-distCI will fail otherwise. - On Windows,
prettierandnccmay rewrite line endings (LF→CRLF). If the only diff after rebuildingdist/is line endings (git diff --ignore-space-at-eol dist/is empty), discard the change — do not commit EOL-only churn.
Release workflow
This is the canonical procedure for cutting a new release. The matching Copilot skill lives at .github/skills/github-action-release/SKILL.md — invoke it when available; otherwise follow these steps literally.
1. Pre-release smoke test
Before bumping any version, pin a consumer pipeline to @main and make sure it passes end-to-end:
- uses: Azure/setup-azd@main2. Decide the version
- Patch — bug fixes, dependency bumps with no behavior change.
- Minor — new features, runtime upgrades (e.g., Node 20 → 24).
- Major — breaking changes (removed inputs, required runner upgrades, etc.). A major bump also requires creating a new floating tag (
v3) and updating README samples to@v3.
Ask the user if unsure.
3. Version-bump PR
Open a PR (use the pull-request skill if available) with these changes and nothing else:
CHANGELOG.md— prepend a new section:## X.Y.Z (YYYY-MM-DD) ### Features Added - [[PR#]](https://github.com/Azure/setup-azd/pull/PR#) Short description. ### Breaking Changes - ... ### Bugs Fixed - ... ### Other Changes - ...Omit empty sections. Reference PR #220 for a good example.
README.md— update only the embeddedaction.ymlsnippet (e.g.,using: 'nodeNN') and any other code examples that reflect implementation details. Leaveuses: Azure/setup-azd@v2alone in the copy-paste samples.package.json— bump the top-levelversion.package-lock.json— bump bothversionfields (the top-level one and the one underpackages."").dist/— ifsrc/changed as part of the release, runnpm ci && npm run alland commit the regenerated bundle. If only version metadata changed,dist/should be untouched (verify withgit diff --ignore-space-at-eol dist/).
Link the PR to any related issue. For issues filed in Azure/azure-dev, use a cross-repo reference like:
Relates to Azure/azure-dev#NNNN4. Merge and tag
After the PR merges to main:
git checkout main
git pull upstream main # or origin main in an Azure org clone
# Full SemVer tag
# Tags MUST be signed (-s, never -a) so GitHub shows the "Verified" badge.
git tag -s v2.3.0 -m "Release 2.3.0"
git push upstream v2.3.0
# Move the floating major tag so `uses: Azure/setup-azd@v2` resolves to this release
git tag -fs v2 -m "Update v2 to 2.3.0"
git push upstream v2 --force
# Confirm both tags show verified: true before drafting the release
gh api /repos/Azure/setup-azd/git/refs/tags/v2.3.0 |
ConvertFrom-Json | % { gh api "/repos/Azure/setup-azd/git/tags/$($_.object.sha)" } |
ConvertFrom-Json | Select-Object -ExpandProperty verificationFor a major bump, create a new floating tag (v3) instead of moving v2, and open a follow-up PR updating the README samples to @v3. Always confirm with the user before any --force push.
5. Draft the GitHub Release
- Go to https://github.com/Azure/setup-azd/releases → Draft a new release.
- Tag: select the
vX.Y.Ztag from Step 4 (or type a new tag name to have GitHub create it on publish). - Target:
main. - Title:
setup-azd_vX.Y.Z(e.g.setup-azd_v2.3.0). Prefixing the repo name disambiguates from unrelatedvX.Y.Ztags in cross-repo release feeds and Marketplace listings. - Description: paste the CHANGELOG entry. "Generate release notes" can seed it; trim to match.
- Check "Publish this Action to the GitHub Marketplace" and select the same primary/secondary categories as the previous release.
- Leave "Set as the latest release" checked unless back-porting.
- Publish release.
Reference: Publishing actions in GitHub Marketplace.
6. Post-release validation
Re-run the consumer pipeline twice — once pinned to the new SemVer tag, once on the floating major tag:
- uses: Azure/setup-azd@v2.3.0 # exact tag
# and separately
- uses: Azure/setup-azd@v2 # floating major tag, must resolve to the new releaseCode-review checklist
When reviewing PRs on this repo, flag any of the following as blockers:
dist/edited manually, or out of sync withsrc/(check-dist will fail).package.json/package-lock.json/CHANGELOG.mdversion drift.- README
uses:sample pinned to a full SemVer instead of@v2. action.ymlruns.usingnot on a supported Node.js version (currentlynode24).- Workflow files using deprecated action versions (baseline:
actions/checkout@v6,actions/setup-node@v6,actions/upload-artifact@v7,github/codeql-action/*@v4). - Release PRs missing a corresponding CHANGELOG entry or not linking the related issue.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

