chore(release): add release workflows#255
Draft
dmcilvaney wants to merge 5 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an automated release/changelog flow for azldev, centered around Mage targets and GitHub Actions workflows, and introduces a pinned git-cliff version (via Cargo) to keep changelog generation reproducible and updatable by Dependabot.
Changes:
- Add Mage release tooling (
mage changelog,mage release) and supporting docs for cutting releases. - Introduce GitHub Actions workflows to prepare a release branch (draft changelog) and to tag/push releases from
main. - Add changelog infrastructure (
cliff.toml,CHANGELOG.md) plus a Cargo-basedgit-cliffversion pin and Dependabot cargo updates.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/README.md | Documents that tools/git-cliff is non-Go and pinned via Cargo for scanners/Dependabot. |
| tools/git-cliff/src/lib.rs | Empty Rust crate stub to support Cargo manifest pinning. |
| tools/git-cliff/Cargo.toml | Pins git-cliff CLI version for CI/local install hints and Dependabot tracking. |
| README.md | Adds badges, improves install instructions (@latest), and links to changelog. |
| pkg/app/azldev_cli/azldev.go | Adds package/function documentation for the CLI entry wiring. |
| magefiles/magerelease/magerelease.go | Introduces Changelog and Release Mage targets for drafting changelog and tagging releases. |
| magefiles/magefile.go | Registers the new magerelease Mage imports/targets. |
| docs/developer/README.md | Adds link to the new release how-to guide. |
| docs/developer/how-to/releasing.md | New developer guide describing the manual + automated release process. |
| cmd/azldev/azldev.go | Adds top-level command doc comment for pkg.go.dev rendering and install guidance. |
| cliff.toml | Adds git-cliff configuration for Keep a Changelog formatted output from Conventional Commits. |
| CHANGELOG.md | Adds initial changelog content and establishes Keep a Changelog format. |
| .github/workflows/release.yml | Push-to-main workflow that runs mage release and pushes a new tag when needed. |
| .github/workflows/prepare-release.yml | Manually-triggered workflow that installs pinned git-cliff, runs mage changelog, and pushes release/vX.Y.Z branch. |
| .github/dependabot.yml | Adds cargo ecosystem updates for the tools/git-cliff pin. |
Comment on lines
+82
to
+84
| GOPROXY=https://proxy.golang.org go list \ | ||
| -m github.com/microsoft/azure-linux-dev-tools@v0.1.1 | ||
| ``` |
| permissions: | ||
| contents: write # Push the release tag. | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| permissions: | ||
| contents: write # Push the release branch. | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
1534929 to
ec270a4
Compare
ec270a4 to
b122aec
Compare
b122aec to
129859f
Compare
| // gitCliffInstallHint builds the "git-cliff is missing" message, naming the version pinned in | ||
| // tools/git-cliff/Cargo.toml when it can be read. | ||
| func gitCliffInstallHint() string { | ||
| const base = "git-cliff not found on PATH. The pin lives in tools/git-cliff/Cargo.toml." |
Comment on lines
+90
to
+92
| git add CHANGELOG.md | ||
| git commit -m "chore: prepare release v${version}" | ||
| git push "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git" "$branch" |
| if git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then | ||
| echo "Tag \`${tag}\` already on remote." >> "$GITHUB_STEP_SUMMARY" | ||
| else | ||
| git push "https://x-access-token:${GH_TOKEN}@github.com/${REPO}.git" "refs/tags/${tag}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on top of #254 to add workflows.