- Merge all PRs intended for the release.
- Ensure any relevant
FIXME
notes in the code are addressed (e.g.FIXME: remove this feature before next major release
). - Rebase latest remote main branch locally (
git pull --rebase origin main
). - Ensure all analysis checks and tests are passing (
time TEST_COMPUTE_INIT=1 TEST_COMPUTE_BUILD=1 TEST_COMPUTE_DEPLOY=1 make all
). - Ensure goreleaser builds locally (
make release GORELEASER_ARGS="--snapshot --skip=validate --skip=post-hooks --clean"
). - Open a new PR to update CHANGELOG (example)1.
- Merge CHANGELOG.
- Rebase latest remote main branch locally (
git pull --rebase origin main
). - Tag a new release (
tag=vX.Y.Z && git tag -s $tag -m $tag && git push $(git config branch.$(git symbolic-ref -q --short HEAD).remote) $tag
)2. - Copy/paste CHANGELOG into the draft release.
- Publish draft release.
Each release of the Fastly CLI triggers a workflow in .github/workflows/publish_release.yml
that results in the creation of a new version of the @fastly/cli
npm package, as well as multiple packages each representing a supported platform/arch combo (e.g. @fastly/cli-darwin-arm64
). These packages are given the same version number as the Fastly CLI release. The workflow then publishes the @fastly/cli
package and the per-platform/arch packages to npmjs.com using the NPM_TOKEN
secret in this repository. The per-platform/arch packages are generated on each release and not committed to source control.
Note
The workflow step that performs npm version
in the directory of the @fastly/cli
package triggers the execution of the version
script listed in its package.json
. In turn, this script creates the per-platform/arch packages.
The @fastly/cli
package is set up to declare the platform/arch-specific packages as optionalDependencies
. When a package installs @fastly/cli
as one of its dependencies
, npm will additionally install just the platform/arch-specific package compatible with the environment.
Note
The optionalDependencies
list only restricts the packages that are actually installed into the node_modules
directory in an environment, and does not affect what is saved to the lockfile (package-lock.json
). All the platform/arch-specific packages will be listed in the lockfile, so a single lockfile is safe to use in environments that may represent a different platform/arch combo.
To see an example of the module layout, run:
npm install @fastly/cli-darwin-arm64 --verbose
ls node_modules/@fastly/cli-darwin-arm64
You should see a fastly
executable binary as well as an index.js
shim which allows the package to be imported as a module by other JavaScript projects.
- We utilize semantic versioning and only include relevant/significant changes within the CHANGELOG (be sure to document changes to the app config if
config_version
has changed, and if any breaking interface changes are made to the fastly.toml manifest those should be documented on https://fastly.com/documentation/developers). - Triggers a github action that produces a 'draft' release.