This document outlines the steps necessary to release a new version of PALM.
The following changes need to be committed to the CHANGELOG.md file:
- Rename "Unreleased" section to "vX.Y.Z - YYYY-MM-DD" where X.Y.Z refers to the new version number and YYYY-MM-DD is the release date. The version number follows the Semantic Versioning strategy, where:
- X (MAJOR): Incremented for incompatible API changes.
- Y (MINOR): Incremented when new functionality is added in a backward-compatible manner.
- Z (PATCH): Incremented for backward-compatible bug fixes.
- Remove empty subsections under the new release section.
- Create a new "Unreleased" section above the new release section, with the following empty subsections under it: "Added", "Changed", "Deprecated", "Removed", "Fixed" and "Security".
Create and push an annotated Git tag to the repo for the release.
-
Create the tag locally:
git tag -a -m "Release vX.Y.Z - YYYY-MM-DD" vX.Y.Z origin/mainReplacing X.Y.Z and YYYY-MM-DD with the version and release date respectively. Optionally replace origin/main with a different commit or object as necessary.
-
Push the tag:
git push origin vX.Y.Z
Download the built images from your Docker registry and export to tar files to be attached to the release.
-
Get the commit SHA of the tag:
git rev-parse vX.Y.Z^{}(Output SHA is referred to as COMMIT in following steps)
-
Download the images from your Docker registry:
docker pull your-docker-registry/palm:COMMIT docker pull your-docker-registry/palm-chainguard:COMMIT
-
Export downloaded images to file:
docker save your-docker-registry/palm:COMMIT | xz > palm-vX.Y.Z.tar.xz docker save your-docker-registry/palm-chainguard:COMMIT | xz > palm-chainguard-vX.Y.Z.tar.xz
- Navigate to your GitHub repository's releases page
- Click "Draft a new release" button
- Select your new tag in the "Choose a tag" dropdown
- Enter "vX.Y.Z - YYYY-MM-DD" as Release title
- Attach palm-vX.Y.Z.tar.xz and palm-chainguard-vX.Y.Z.tar.xz to the release
- Click Publish release
Each version of PALM will be accompanied by release notes detailing the major additions and breaking changes contained in that release. These release notes are available on the PALM GitHub project’s 'Releases' page.
Given the fragile nature of GitHub Release Notes (no version control), we track our in-flight changes in a versioned document within the codebase: Draft Release Notes. This is the workflow:
- Additions made to the release notes file as we make major modifications to the repo
- On new release, we add that version of
DRAFT_RELEASE_NOTES.mdto the GitHub release - Post-release,
DRAFT_RELEASE_NOTES.mdis reset back to default state