From 74842866bb086959431479323ec71595091efdd0 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Mon, 16 Nov 2026 17:39:46 +1100 Subject: [PATCH 1/2] ci: run EV signing jobs in the code-signing environment The EV signing service account in coder-ci will only trust jobs in this repository's code-signing environment, which only main and v* tags may use (coder/github-org-terraform). Today it trusts every workflow in the repository, so any branch can sign with Coder's EV certificate. Also describe the code-signing environment and tag rules in RELEASING.md. Signed-off-by: Dean Sheather --- .github/workflows/release.yml | 3 +++ .github/workflows/upload-release.yml | 3 +++ RELEASING.md | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1500c11..d3e712a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,9 @@ on: jobs: release: name: Release + # The EV signing service account (coder-ci) only trusts jobs in this + # environment, which only main and v* tags may use. + environment: code-signing # Release builds require macOS (see scripts/build.go). runs-on: macos-15 timeout-minutes: 90 diff --git a/.github/workflows/upload-release.yml b/.github/workflows/upload-release.yml index aaeb6573..7adc4488 100644 --- a/.github/workflows/upload-release.yml +++ b/.github/workflows/upload-release.yml @@ -14,6 +14,9 @@ concurrency: jobs: upload: + # The EV signing service account (coder-ci) only trusts jobs in this + # environment, which only main and v* tags may use. + environment: code-signing runs-on: ubuntu-latest timeout-minutes: 15 permissions: diff --git a/RELEASING.md b/RELEASING.md index 744a3b40..8ce0e612 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,7 +12,9 @@ Desktop. All of them are produced by the 1. Bump the version in `pkg/mutagen/version.go` and merge that change. 2. Tag the merged commit and push the tag. The tag must match the version - (`v` prefix plus `mutagen version` output): + (`v` prefix plus `mutagen version` output). Only repository admins, + maintainers and the `release-managers` team may push `v*` tags (the + `Release tags` ruleset in coder/github-org-terraform): ```bash git tag -a v0.18.4 -m v0.18.4 @@ -21,10 +23,12 @@ Desktop. All of them are produced by the The release workflow builds and signs the artifacts and creates a GitHub release with them attached. Running the workflow manually from the Actions - tab builds the same artifacts from any ref and attaches them to the workflow - run instead, which is useful for a dry run. + tab on `main` builds the same artifacts and attaches them to the workflow + run instead, which is useful for a dry run. Signing jobs run in the + `code-signing` environment, which only `main` and `v*` tags may use, so a + manual run from any other branch fails. 3. Run the [Upload release workflow](.github/workflows/upload-release.yml) - manually from the Actions tab, with the existing release tag (for example, + manually from the Actions tab on `main`, with the existing release tag (for example, `v0.18.4`) as the `tag` input. It downloads the five release payloads and `SHA256SUMS`, verifies the complete checksum manifest, and uploads the files to `gs://coder-desktop/mutagen//` without rebuilding or re-signing them. @@ -63,8 +67,11 @@ Federation. It needs the following repository configuration: as coder/coder The service account, its Cloud KMS roles, and its workload identity binding -for this repository are managed in coder/gcp under -`projects/production/coder-ci`. +are managed in coder/gcp under `projects/production/coder-ci`. The binding +only trusts jobs in this repository's `code-signing` environment +(`repo:coder/mutagen:environment:code-signing`), which is managed in +coder/github-org-terraform. Every job that authenticates as the service +account, including the upload workflow, must run in that environment. ## Upload setup From 5b19db1e961fd3785fd8f1bd30542210a84d1384 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Mon, 16 Nov 2026 18:49:59 +1100 Subject: [PATCH 2/2] docs: list coder-desktop-release-managers in RELEASING.md Coder Desktop release managers may push v* tags too. Signed-off-by: Dean Sheather --- RELEASING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 8ce0e612..742f2866 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -13,8 +13,9 @@ Desktop. All of them are produced by the 1. Bump the version in `pkg/mutagen/version.go` and merge that change. 2. Tag the merged commit and push the tag. The tag must match the version (`v` prefix plus `mutagen version` output). Only repository admins, - maintainers and the `release-managers` team may push `v*` tags (the - `Release tags` ruleset in coder/github-org-terraform): + maintainers and the `coder-desktop-release-managers` and + `release-managers` teams may push `v*` tags (the `Release tags` ruleset + in coder/github-org-terraform): ```bash git tag -a v0.18.4 -m v0.18.4