-
Notifications
You must be signed in to change notification settings - Fork 77
ci: Fix release artifact publication #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
timflannagan
wants to merge
1
commit into
main
Choose a base branch
from
fix/release-pipeline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,17 +4,27 @@ on: | |
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version number' | ||
|
|
||
| env: | ||
| VERSION: ${{ github.event.inputs.version || github.ref_name }} | ||
| VERSION: ${{ github.ref_name }} | ||
| DOCKER_REGISTRY: ghcr.io | ||
| DOCKER_BUILD_REGISTRY: ghcr.io | ||
|
|
||
| jobs: | ||
| validate: | ||
| name: Validate release version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Validate version | ||
| shell: bash | ||
| run: | | ||
| if [[ ! "${VERSION}" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was tempted to emulate https://github.com/kgateway-dev/kgateway/blob/467617fbaeae1a4aa14a271657391a64bc77866a/.github/workflows/release.yaml#L100 but this is fine for now |
||
| echo "::error::version must match vX.Y.Z; got ${VERSION}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| docker: | ||
| needs: validate | ||
| strategy: | ||
| matrix: | ||
| image: | ||
|
|
@@ -121,7 +131,3 @@ jobs: | |
| bin/arctl-* | ||
| build/charts/*.tgz | ||
| build/charts/checksums.txt | ||
|
|
||
| - name: Log out of Helm registry | ||
|
timflannagan marked this conversation as resolved.
|
||
| if: always() | ||
| run: $HELM registry logout "${HELM_REGISTRY}" || true | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Releasing AgentRegistry | ||
|
|
||
| AgentRegistry releases are published by the GitHub Actions release workflow. | ||
| The supported release path is to tag a commit on `main`; release artifacts | ||
| should not be published manually from a developer workstation. | ||
|
|
||
| AgentRegistry follows Semantic Versioning: | ||
|
|
||
| - Major (`X.0.0`): breaking API or behavior changes. | ||
| - Minor (`X.Y.0`): backward-compatible features. | ||
| - Patch (`X.Y.Z`): backward-compatible fixes, including security fixes. | ||
|
|
||
| Release Git tags and container image tags include a leading `v`, such as | ||
| `v0.4.0`. Helm chart versions omit the prefix, such as `0.4.0`. | ||
|
|
||
| ## Published artifacts | ||
|
|
||
| For a `vX.Y.Z` release, `.github/workflows/release.yaml` publishes: | ||
|
|
||
| - Multi-architecture Linux container images for `amd64` and `arm64`: | ||
| - `ghcr.io/agentregistry-dev/agentregistry/server:vX.Y.Z` | ||
| - `ghcr.io/agentregistry-dev/agentregistry/arctl-agentgateway:vX.Y.Z` | ||
| - CLI binaries and individual SHA-256 files for: | ||
| - Linux `amd64` and `arm64` | ||
| - macOS `amd64` and `arm64` | ||
| - Windows `amd64` | ||
| - The Helm chart at | ||
| `oci://ghcr.io/agentregistry-dev/agentregistry/charts/agentregistry` | ||
| with chart version `X.Y.Z` and application version `vX.Y.Z`. | ||
| - A GitHub Release with generated release notes, the CLI files, the packaged | ||
| Helm chart, and the chart checksum file. | ||
|
|
||
| ## Cut a release | ||
|
|
||
| 1. Choose the next version according to Semantic Versioning. | ||
| 2. Confirm the release commit is on `main` and all required checks pass. | ||
| 3. Review merged changes since the previous release for the generated release | ||
| notes. | ||
| 4. Create and push an annotated tag from the release commit: | ||
|
|
||
| ```bash | ||
| git fetch origin | ||
| git tag -a vX.Y.Z origin/main -m "Release vX.Y.Z" | ||
| git push origin vX.Y.Z | ||
| ``` | ||
|
|
||
| 5. Monitor the `Release` workflow. The GitHub Release is created only after | ||
| both container images and the Helm chart have been published successfully. | ||
|
|
||
| Do not move or reuse a published release tag. If released content needs to | ||
| change, publish a new patch version. | ||
|
|
||
| ## Verify a release | ||
|
|
||
| Confirm all jobs in the `Release` workflow succeeded, then verify each public | ||
| artifact: | ||
|
|
||
| ```bash | ||
| gh release view vX.Y.Z | ||
| docker pull ghcr.io/agentregistry-dev/agentregistry/server:vX.Y.Z | ||
| docker pull ghcr.io/agentregistry-dev/agentregistry/arctl-agentgateway:vX.Y.Z | ||
| helm show chart \ | ||
| oci://ghcr.io/agentregistry-dev/agentregistry/charts/agentregistry \ | ||
| --version X.Y.Z | ||
| ``` | ||
|
|
||
| The GitHub Release should contain each CLI binary next to its `.sha256` file, | ||
| plus `agentregistry-X.Y.Z.tgz` and `checksums.txt`. Compare downloaded files | ||
| against their published SHA-256 values before distributing them. | ||
|
|
||
| The Helm output should report `version: X.Y.Z` and `appVersion: vX.Y.Z`. The | ||
| default rendered server image must therefore use the same `vX.Y.Z` tag that | ||
| the container job published. | ||
|
|
||
| ## Retry and recovery | ||
|
|
||
| First use GitHub Actions to rerun only failed jobs. Artifact publishing can be | ||
| partially complete, so inspect the GitHub Release, GHCR packages, and Helm OCI | ||
| chart before retrying. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I forget myself, needed as the Makefile itself splits up these variables. Should simplify later