Skip to content

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 in VERSION, 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, or DEPLOY_KEY is 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-gate with branch: main and stops if CI did not pass for the head commit of main
  • uses ./.github/actions/suite-tests with caching disabled (enable_cache: false) to run make test, and then runs make check-lockstep-version
  • reads the version from VERSION and verifies that the tag does not exist locally or on the remote
  • extracts the release notes with make release-notes (the CHANGELOG.md section ## 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 uv cache 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 prepare and runs no dependency code
  • runs in the release-tag environment, which holds DEPLOY_KEY. The environment has no required reviewers, and only main can use it, so a workflow on another branch cannot read the key
  • checks out the commit with the DEPLOY_KEY SSH key and pushes the tag <VERSION> over SSH (without --force). The organisation ruleset does not let GITHUB_TOKEN create 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 with gh 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 concurrency group 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 prepare and tag-and-release jobs and calls publish.yml with the new tag
  • the called publish job waits in the release-publish environment, 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-credentials job: none
  • prepare job: contents: read and actions: read
  • tag-and-release job: contents: write
  • publish job: contents: read and id-token: write

Secrets and tokens:

  • GITHUB_TOKEN is used by gh release create. The first checkout does not keep a token
  • DEPLOY_KEY is a deploy key with write access that can bypass the tag ruleset. It is a release-tag environment secret, and only the tag-and-release job uses it
  • check-credentials reads ECCR_USERNAME, ECCR_PASSWORD, DOCS_TOKEN, and DEPLOY_KEY only 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 read ECCR_USERNAME and ECCR_PASSWORD from the release-publish environment, and DOCS_TOKEN from the release-docs environment

publish.yml

Purpose:

  • publish release-tagged images and the Helm chart for a release tag

Triggers:

  • workflow_call, from release.yml
  • workflow_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-request job runs first, before any approval request. It stops a run whose ref is not refs/heads/main, so the workflow file of main is the only authoritative copy. It also fails when ECCR_USERNAME, ECCR_PASSWORD, or DOCS_TOKEN is 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-settings job runs in the release-docs environment and checks that DOCS_BASE_URL and DOCS_TOKEN are set. A missing setting thus fails before the approval request and before the images are built
  • the publish job runs in the release-publish environment, which holds the registry credentials. Required reviewers on that environment decide, per run, whether publishing may start. The publish-docs job needs the approved publish job, so a release needs one approval, not two
  • checks out the tag, without a persisted token
  • fails if the VERSION file in the tag is not the same as the tag
  • uses the same runner (GitHub-hosted ubuntu-24.04) and publishing action as develop.yml
  • runs make release, which validates lockstep versioning and publishes the images and the Helm chart using the root VERSION
  • a concurrency group for each tag stops two publishes of the same tag at the same time
  • the publish-docs job runs after publish on a separate runner of the same type, in the release-docs environment. It checks out the tag, sets up Make with .github/actions/setup-make, sets up uv (no cache), installs a fixed sitesctl build (SITESCTL_VERSION) from the ECMWF repository and verifies its SHA-256 (SITESCTL_SHA256), and runs make publish-docs with DOCS_SOURCE_REF set to the tag
  • all releases upload to one documentation site. The publish-docs concurrency 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 publish and publish-docs jobs summarize their release tag, publishing target, and final job status

Permissions:

  • top-level contents: read
  • check-request and check-docs-settings jobs: none
  • publish job: contents: read and id-token: write (Vault authentication)
  • publish-docs job: contents: read

Credential inputs:

  • ECCR_USERNAME and ECCR_PASSWORD: release-publish environment secrets
  • DOCS_BASE_URL: the Sites platform URL. Set it as a release-docs environment secret, or as a repository or environment variable. The secret takes precedence. A repository secret does not reach a run that release.yml starts
  • DOCS_TOKEN: a release-docs environment secret with a token that has write access to the destination site. Only check-docs-settings (presence check) and publish-docs (upload) receive it

Setting up release publishing

  1. Create the release-publish environment (Settings, Environments). Add required reviewers, and select Prevent self-review.
  2. Create the release-docs and release-tag environments. They have no required reviewers: publish-docs runs only after the approved publish job, and tag-and-release runs only after the CI gate and the tests pass on main.
  3. In all three environments, set Deployment branches and tags to Selected branches and tags, and add only the main branch. Release and Publish runs start from main; a copy of the workflow on another branch then cannot use the environments.
  4. Add ECCR_USERNAME and ECCR_PASSWORD as release-publish environment secrets, DOCS_TOKEN (and DOCS_BASE_URL, when it is a secret) as release-docs environment secrets, and DEPLOY_KEY as a release-tag environment secret.
  5. 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.