Releases and publishing¶
Release creation (release.yml) and artifact publication (publish.yml). The develop channel is in Continuous integration. Registry and credential rules are on the CI/CD overview.
release.yml¶
Purpose:
- start a release manually from
main: create the Git tag and the GitHub release for the version inVERSION, then publish the images and the Helm chart
Triggers:
workflow_dispatch
Behavior of the check-credentials job:
- runs first, with no permissions and no repository code
- fails when
ECCR_USERNAME,ECCR_PASSWORD,DOCS_TOKEN, orDEPLOY_KEYis a repository or organization secret. These values must be environment secrets (see Setting up release publishing)
Behavior of the prepare job:
- runs after
check-credentials - fails early when the selected ref is not
main - has no write access and no secrets, because it runs dependency code
- checks out the commit, then uses
./.github/actions/check-ci-gatewithbranch: mainand stops if CI did not pass for the head commit ofmain - uses
./.github/actions/suite-testswith caching disabled (enable_cache: false) to runmake test, and then runsmake check-lockstep-version - reads the version from
VERSIONand verifies that the tag does not exist locally or on the remote - extracts the release notes with
make release-notes(theCHANGELOG.mdsection## Version <VERSION>). The job fails if the section is missing or empty - gives the version and the release notes to the next jobs as job outputs
- does not use the
uvcache or the Go cache - summarizes the CI gate, version checks, tag checks, and release-note preparation
Behavior of the tag-and-release job:
- runs after
prepareand runs no dependency code - runs in the
release-tagenvironment, which holdsDEPLOY_KEY. The environment has no required reviewers, and onlymaincan use it, so a workflow on another branch cannot read the key - checks out the commit with the
DEPLOY_KEYSSH key and pushes the tag<VERSION>over SSH (without--force). The organisation ruleset does not letGITHUB_TOKENcreate tags, and the deploy key is a bypass actor - the checkout step has a
zizmor: ignore[artipacked]comment. The next step needs the key, the job uploads no artifacts, and the checkout action removes the key at the end of the job - creates the GitHub release (title
Version <VERSION>) on the existing tag withgh release create --verify-tag --notes-file, through the GitHub API - if the release step fails after the tag push, the tag stays. Delete the tag, or create the release manually, before you run the workflow again
- the workflow-level
concurrencygroup allows only one release run at a time - summarizes the tag and GitHub release result without including release notes or secrets
Behavior of the publish job:
- runs after the
prepareandtag-and-releasejobs and callspublish.ymlwith the new tag - the called
publishjob waits in therelease-publishenvironment, so the release pauses once for approval before the images and chart are pushed. The documentation upload needs that job, so one acceptance covers the whole release. The pending deployment appears on this run
Permissions:
- top-level none
check-credentialsjob: nonepreparejob:contents: readandactions: readtag-and-releasejob:contents: writepublishjob:contents: readandid-token: write
Secrets and tokens:
GITHUB_TOKENis used bygh release create. The first checkout does not keep a tokenDEPLOY_KEYis a deploy key with write access that can bypass the tag ruleset. It is arelease-tagenvironment secret, and only thetag-and-releasejob uses itcheck-credentialsreadsECCR_USERNAME,ECCR_PASSWORD,DOCS_TOKEN, andDEPLOY_KEYonly to make sure that no shared copy exists, so no tag is created while one exists- the workflow passes no secrets to
publish.yml. The called jobs readECCR_USERNAMEandECCR_PASSWORDfrom therelease-publishenvironment, andDOCS_TOKENfrom therelease-docsenvironment
publish.yml¶
Purpose:
- publish release-tagged images and the Helm chart for a release tag
Triggers:
workflow_call, fromrelease.ymlworkflow_dispatch, to publish an existing tag again
Both triggers have the required input tag. The workflow does not start on the release event. A release that GITHUB_TOKEN creates does not start other workflows, and a release created in another way would publish a second time.
Behavior:
- the
check-requestjob runs first, before any approval request. It stops a run whose ref is notrefs/heads/main, so the workflow file ofmainis the only authoritative copy. It also fails whenECCR_USERNAME,ECCR_PASSWORD, orDOCS_TOKENis a repository or organization secret. It has no permissions and runs no repository code. The main-only deployment branch policies of the environments are the control that enforces the ref, because a branch can change its own copy of the workflow - the
check-docs-settingsjob runs in therelease-docsenvironment and checks thatDOCS_BASE_URLandDOCS_TOKENare set. A missing setting thus fails before the approval request and before the images are built - the
publishjob runs in therelease-publishenvironment, which holds the registry credentials. Required reviewers on that environment decide, per run, whether publishing may start. Thepublish-docsjob needs the approvedpublishjob, so a release needs one approval, not two - checks out the tag, without a persisted token
- fails if the
VERSIONfile in the tag is not the same as the tag - uses the same runner (GitHub-hosted
ubuntu-24.04) and publishing action asdevelop.yml - runs
make release, which validates lockstep versioning and publishes the images and the Helm chart using the rootVERSION - a
concurrencygroup for each tag stops two publishes of the same tag at the same time - the
publish-docsjob runs afterpublishon a separate runner of the same type, in therelease-docsenvironment. It checks out the tag, sets up Make with.github/actions/setup-make, sets upuv(no cache), installs a fixedsitesctlbuild (SITESCTL_VERSION) from the ECMWF repository and verifies its SHA-256 (SITESCTL_SHA256), and runsmake publish-docswithDOCS_SOURCE_REFset to the tag - all releases upload to one documentation site. The
publish-docsconcurrency group (without cancellation) allows one upload at a time. If you publish an older tag again, its pages replace the newer pages with the same name. A failed upload fails the workflow - the
publishandpublish-docsjobs summarize their release tag, publishing target, and final job status
Permissions:
- top-level
contents: read check-requestandcheck-docs-settingsjobs: nonepublishjob:contents: readandid-token: write(Vault authentication)publish-docsjob:contents: read
Credential inputs:
ECCR_USERNAMEandECCR_PASSWORD:release-publishenvironment secretsDOCS_BASE_URL: the Sites platform URL. Set it as arelease-docsenvironment secret, or as a repository or environment variable. The secret takes precedence. A repository secret does not reach a run thatrelease.ymlstartsDOCS_TOKEN: arelease-docsenvironment secret with a token that has write access to the destination site. Onlycheck-docs-settings(presence check) andpublish-docs(upload) receive it
Setting up release publishing¶
- Create the
release-publishenvironment (Settings, Environments). Add required reviewers, and select Prevent self-review. - Create the
release-docsandrelease-tagenvironments. They have no required reviewers:publish-docsruns only after the approvedpublishjob, andtag-and-releaseruns only after the CI gate and the tests pass onmain. - In all three environments, set Deployment branches and tags to Selected branches and tags, and add only the
mainbranch. Release and Publish runs start frommain; a copy of the workflow on another branch then cannot use the environments. - Add
ECCR_USERNAMEandECCR_PASSWORDasrelease-publishenvironment secrets,DOCS_TOKEN(andDOCS_BASE_URL, when it is a secret) asrelease-docsenvironment secrets, andDEPLOY_KEYas arelease-tagenvironment secret. - Delete the repository and organization secrets with these names. Every workflow on every branch can read a shared secret, and the Release and Publish workflows fail while one exists.
The called jobs read the environment secrets directly, so release.yml passes no secrets to publish.yml.
The credential action does not read repository variables. If either ECCR value is missing, it uses Vault with GitHub OpenID Connect (OIDC) authentication. The Vault endpoints are accessible only from the ECMWF internal network, so the GitHub-hosted runner cannot use them. Set both environment secrets. With an environment, the OIDC subject claim is repo:ecmwf/ecmwf-sites:environment:release-publish; bind a Vault role to that claim.