Release: cut over Echoion 2.0 components
Modular container CI / release-build (push) Has been cancelled

This commit is contained in:
faumaray committed 2026-07-29 20:35:27 +03:00
1 parent 1305d37fae
commit 458dde05a6
169 files changed
+3069 -32261

No files matched your search

+61 -46
View File
@@ -58,44 +58,50 @@ Enable Actions and add these repository secrets:
| Secret | Purpose |
| --- | --- |
| `RELEASE_CHECKOUT_SSH_KEY` | Read-only key used for the root checkout. |
| `RELEASE_BOT_TOKEN` | PAT owned by a dedicated bot. It needs read access to the component repositories plus release/tag and `release-feed` write access in this repository. |
| `RELEASE_CHECKOUT_SSH_KEY` | Read-only SSH key used for root, component, and `release-feed` checkouts. Grant it access to every private component repository before cutover. |
| `RELEASE_BOT_TOKEN` | PAT owned by a dedicated bot. It needs read access to every component repository plus release/tag and `release-feed` write access in this repository. |
| `RELEASE_TAG_ALLOWED_SIGNERS` | Complete OpenSSH `allowed_signers` lines for maintainers allowed to publish `v*` tags. |
| `RELEASE_FEED_ED25519_PRIVATE_KEY` | PEM private key matching `release-keys/echoion-release-2026-07.pub.pem`. Preserve its newlines. |
Component checkouts use the release PAT with `persist-credentials: false`, so
the credential is removed before repository scripts run. The feed signing key
must not be stored in Git, runner images, Actions variables, or release assets.
Component checkouts use SSH with `persist-credentials: false`. Release API
operations use the bot PAT, but Git fetches and pushes never rewrite remotes to
HTTPS. The feed signing key must not be stored in Git, runner images, Actions
variables, or release assets.
## Independent component repositories
Echoion does not use Git submodules. `components.lock.json` is the immutable
checkout manifest for `EchoionApi`, `EchoionCore`, and `EchoionDesktop`. CMake
uses a component already present beside the root checkout; otherwise it fetches
the locked revision. All three Gitea workflows check out those revisions as
ordinary repositories before entering Docker.
Echoion does not use Git submodules. `components.json` describes the nine
independent repositories: `EchoionApi`, `EchoionHost`, `EchoionCore`,
`EchoionWeb`, `EchoionStandalone`, `EchoionUpdater`, `EchoionDesktop`,
`EchoionPluginUrlShortenerInternal`, and
`EchoionPluginUrlShortenerExternal`. `components.lock.json` is the immutable
release checkout manifest. All Gitea workflows check out the locked revisions
as ordinary SSH repositories before entering Docker.
For a new developer checkout:
```bash
python3 scripts/sync-components.py
scripts/prepare-release.sh --workspace ..
```
After changing a component, commit and push that component first, then refresh
and commit the root lock:
For ordinary development CMake follows each component's `main` branch unless a
`CPM_<Component>_SOURCE` override is supplied. Release builds use the exact
lock. After changing a component, make a signed commit and push it over SSH
first, then refresh and commit the root lock:
```bash
python3 scripts/sync-components.py --record
scripts/prepare-release.sh --workspace ..
git add components.lock.json
git commit -S -m 'Release: lock Echoion 2.0.0 components'
```
`--record` refuses dirty component repositories, so a lock can never point at
uncommitted source. `--update` moves existing clean component checkouts to the
locked revisions. Product version changes are separate: edit only
The preparer refuses dirty, inaccessible, missing, non-fast-forward, or
version/tag-inconsistent component repositories, so a lock can never point at
unpublished source. Product version changes are separate: edit only
`project(Echoion VERSION ...)` in root `CMakeLists.txt`; orchestrated component
builds and release overrides inherit that value. A stable or beta release tag
must have the same numeric base as this CMake version, so `v1.2.3` and
`v1.2.3-rc.1` both require `project(Echoion VERSION 1.2.3 ...)`. The release
must have the same numeric base as this CMake version, so `v2.0.0` and
`v2.0.0-rc.1` both require `project(Echoion VERSION 2.0.0 ...)`. The release
workflow rejects mismatches before building.
Nightlies use the newer of the root CMake version and the next patch after the
@@ -114,17 +120,28 @@ Gitea uses the same allowlist for tag creation and later tag changes; when
immutable release tags are required, add a server-side pre-receive policy that
rejects updates and deletion after creation. Protect `main` in the normal way.
The updater feed URL is:
The updater source can use the feed base:
```text
https://<gitea>/<owner>/<repo>/raw/branch/release-feed/feeds/echoion-runtime.json
https://<gitea>/<owner>/<repo>/raw/branch/release-feed
```
The embedded updater trust configuration is represented by
`release-keys/official-update-keys.json`. `scripts/release.sh` validates and
or an exact channel catalog:
```text
https://<gitea>/<owner>/<repo>/raw/branch/release-feed/feeds/stable/catalog.json
```
The catalog resolves immutable component documents under
`feeds/<channel>/<component>/<version>.json` and plugin documents under
`feeds/<channel>/plugins/<plugin-id>/<version>.json`. The embedded updater
trust configuration is represented by
`.gitea/release-keys/official-update-keys.json`. `scripts/release.sh` validates and
embeds that JSON automatically. Release workflows also pass the HTTPS
`release-feed` branch URL through `--official-update-feed-url`, so a fresh
installation has a signed official source without operator-side duplication.
channel catalog through `--official-update-feed-url`, so a fresh installation
has a signed official source without operator-side duplication. The v1
`feeds/echoion-runtime.json` feed is not published at the 2.0 cutover; v1
operators must stop their service and run the signed v2 installer manually.
## Stable and beta releases
@@ -136,9 +153,9 @@ for the tag:
```bash
git config gpg.format ssh
git config user.signingkey ~/.ssh/echoion-release-maintainer
git tag -s -a v1.2.3 -m 'Echoion 1.2.3'
test "$(git cat-file -t refs/tags/v1.2.3)" = tag
git push origin v1.2.3
git tag -s -a v2.0.0 -m 'Echoion 2.0.0'
test "$(git cat-file -t refs/tags/v2.0.0)" = tag
git push origin v2.0.0
```
The private-key path works without an SSH agent. A `.pub` path may be used
@@ -155,8 +172,9 @@ The workflow creates or resumes a draft, replaces incomplete draft assets,
uploads every file in `dist/`, downloads every asset through Gitea, checks
its size and SHA-256, and only then publishes. A rerun against an already
published release is read-only and succeeds only when all remote assets still
match. The signed aggregate feed is committed after release publication; a
feed failure can therefore be retried without replacing a published release.
match. The signed catalog and all component feeds are committed together after
release publication; a feed failure can therefore be retried without replacing
a published release.
## Nightly releases
@@ -167,15 +185,16 @@ semantic release, nightlies use the root CMake
`project(Echoion VERSION x.y.z)` value without incrementing it. Drafts, failed
publications, and `nightly-*` releases do not affect the base. Nightlies use the
`nightly` channel, publish as prereleases, and keep the newest 14 Gitea
releases. The aggregate feed also keeps the newest 14 distinct nightly versions
while retaining stable and beta records. Gitea materializes a missing
releases. Channel catalogs remain separate, and nightly publication never
advances stable component state. Gitea materializes a missing
`nightly-*` Git tag only when the download-verified draft is published; the
publisher then verifies its commit immediately and never moves an existing tag
whose target differs. Stable and beta publishing require their signed tag to
exist before creating a draft. If `nightly-*` is protected separately, allow
the release bot to create and delete it.
Every aggregate envelope expires 45 days after generation. Scheduled
Every rolling catalog and `latest.json` envelope expires 45 days after
generation. Scheduled
nightlies normally refresh it daily. Alert when the feed branch has not
advanced for more than seven days, and treat 30 days without a successful
signing run as urgent.
@@ -204,17 +223,12 @@ openssl pkey -pubin -in echoion-release-YYYY-MM.pub.pem -outform DER |
printf '\n'
```
Add the new public key to official builds before signing any feed with it.
Keep the old public key embedded for at least one full update lifetime. During
the first signing run with the new key, pass each prior envelope key explicitly
to `aggregate_update_feed.py` as
`--trusted-existing-key OLD_KEY_ID=OLD_PUBLIC_KEY_PATH`; this permits only
verification of the old envelope and never selects the old key for signing.
Update the signing key id and public-key paths in both release workflows, add
the old-key verification argument while an old envelope may exist, and replace
the private-key secret. The merger verifies the newly generated signature
against the new committed public key before writing either output. Never print
the private key or pass it as a command-line argument.
Add the new public key to official builds before signing any feed with it and
keep the old public key embedded for at least one full update lifetime. Update
the signing key id in both release workflows and replace the private-key
secret only after the build containing both trust roots is installed broadly.
Immutable version feeds are never rewritten during rotation. Never print the
private key or pass it as a command-line argument.
## Recovery rules
@@ -227,5 +241,6 @@ the private key or pass it as a command-line argument.
- A failed feed push leaves the published release available but undiscoverable
to auto-update. Rerun the workflow; publication verification is idempotent
and the feed step will run again.
- Never edit `release-feed` manually. The merger verifies the existing
Ed25519 envelope before using any prior entries.
- Never edit `release-feed` manually. The publisher validates immutable
version feeds, replay sequences, and component state before committing the
complete transaction.
+39 -65
View File
@@ -1,4 +1,4 @@
name: Container CI
name: Modular container CI
on:
push:
@@ -22,7 +22,7 @@ jobs:
docker version
docker info
- name: Check out source
- name: Check out root over SSH
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
@@ -32,79 +32,53 @@ jobs:
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
persist-credentials: false
- name: Read locked component repositories
id: components
- name: Verify source-free root and resolve every lock over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
python3 - "$GITHUB_OUTPUT" <<'PY'
import json
import pathlib
import sys
lock = json.loads(pathlib.Path("components.lock.json").read_text())
with pathlib.Path(sys.argv[1]).open("a") as output:
for component, key in (
("EchoionApi", "api"),
("EchoionCore", "core"),
("EchoionDesktop", "desktop"),
):
entry = lock["components"][component]
print(f"{key}_repository={entry['repository']}", file=output)
print(f"{key}_revision={entry['revision']}", file=output)
PY
- name: Check out EchoionApi
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.api_repository }}
ref: ${{ steps.components.outputs.api_revision }}
path: EchoionApi
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out EchoionCore
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.core_repository }}
ref: ${{ steps.components.outputs.core_revision }}
path: EchoionCore
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out EchoionDesktop
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.desktop_repository }}
ref: ${{ steps.components.outputs.desktop_revision }}
path: EchoionDesktop
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
scripts/ci-checkout-components.sh \
"$PWD/components" \
"$PWD/dependencies"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
- name: Build, test, and package without starting Echoion
env:
CI_VERSION: 0.0.0-ci.${{ gitea.run_number }}.${{ gitea.run_attempt }}
CI_VERSION: 2.0.0-ci.${{ gitea.run_number }}.${{ gitea.run_attempt }}
run: |
set -eu
scripts/release.sh --version "$CI_VERSION"
set -euo pipefail
scripts/release.sh \
--version "$CI_VERSION" \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--update-channel beta \
--update-sequence "${{ gitea.run_number }}"
- name: Test release control-plane scripts
- name: Test release control-plane scripts offline
shell: bash
run: |
set -eu
set -euo pipefail
bash scripts/tests/test-gitea-tag-verification.sh
. scripts/lib/docker-daemon-path.sh
docker_workspace=$(docker_daemon_path "$PWD")
docker run --rm --network none \
--volume "$docker_workspace:/workspace:ro" \
--workdir /workspace \
echoion-release-builder:gcc-16.1.0 \
python3 scripts/tests/test_aggregate_update_feed.py
docker run --rm --network none \
--volume "$docker_workspace:/workspace:ro" \
--workdir /workspace \
echoion-release-builder:gcc-16.1.0 \
python3 scripts/tests/test_gitea_release.py
for test_script in \
scripts/tests/test_package_components.py \
scripts/tests/test_publish_component_feeds.py \
scripts/tests/test_gitea_release.py
do
docker run --rm --network none \
--volume "$docker_workspace:/workspace:ro" \
--workdir /workspace \
echoion-release-builder:gcc-16.1.0 \
python3 "$test_script"
done
+66 -113
View File
@@ -1,4 +1,4 @@
name: Nightly release
name: Nightly modular release
on:
schedule:
@@ -8,6 +8,10 @@ on:
permissions:
contents: read
concurrency:
group: echoion-release-feed
cancel-in-progress: false
jobs:
publish-nightly:
runs-on: ubuntu-24.04
@@ -21,7 +25,7 @@ jobs:
docker version
docker info
- name: Check out main
- name: Check out signed main over SSH
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: main
@@ -32,59 +36,26 @@ jobs:
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
persist-credentials: false
- name: Read locked component repositories
id: components
- name: Verify root cutover and check out locked components over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: |
set -euo pipefail
python3 - "$GITHUB_OUTPUT" <<'PY'
import json
import pathlib
import sys
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
scripts/ci-checkout-components.sh \
"$PWD/components" \
"$PWD/dependencies"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
lock = json.loads(pathlib.Path("components.lock.json").read_text())
with pathlib.Path(sys.argv[1]).open("a") as output:
for component, key in (
("EchoionApi", "api"),
("EchoionCore", "core"),
("EchoionDesktop", "desktop"),
):
entry = lock["components"][component]
print(f"{key}_repository={entry['repository']}", file=output)
print(f"{key}_revision={entry['revision']}", file=output)
PY
- name: Check out EchoionApi
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.api_repository }}
ref: ${{ steps.components.outputs.api_revision }}
path: EchoionApi
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out EchoionCore
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.core_repository }}
ref: ${{ steps.components.outputs.core_revision }}
path: EchoionCore
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out EchoionDesktop
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.desktop_repository }}
ref: ${{ steps.components.outputs.desktop_revision }}
path: EchoionDesktop
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Derive the nightly identity
- name: Derive nightly identity and URLs
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
@@ -108,36 +79,37 @@ jobs:
--run-number "$RUN_NUMBER"
)
tag="nightly-${date_id}-${RUN_NUMBER}"
artifact="echoion-${version}-linux-x86_64.tar.zst"
url="${SERVER_URL}/${REPOSITORY}/releases/download/${tag}/${artifact}"
feed_url="${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/echoion-runtime.json"
python3 scripts/validate-semver.py "$version"
{
printf 'RELEASE_TAG=%s\n' "$tag"
printf 'RELEASE_VERSION=%s\n' "$version"
printf 'RELEASE_CHANNEL=nightly\n'
printf 'RELEASE_PRERELEASE=true\n'
printf 'RELEASE_ARTIFACT_URL=%s\n' "$url"
printf 'RELEASE_FEED_URL=%s\n' "$feed_url"
printf 'RELEASE_SEQUENCE=%s\n' "$RUN_NUMBER"
printf 'RELEASE_ARTIFACT_BASE_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/releases/download/${tag}"
printf 'RELEASE_FEED_URL=%s\n' \
"${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/nightly/catalog.json"
printf 'RELEASE_TARGET=%s\n' "$(git rev-parse HEAD)"
} >>"$GITHUB_ENV"
- name: Build and test the dynamic nightly in Docker
- name: Build and test all locked repositories in Docker
shell: bash
run: |
set -euo pipefail
scripts/release.sh \
--version "$RELEASE_VERSION" \
--update-url "$RELEASE_ARTIFACT_URL" \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--official-update-feed-url "$RELEASE_FEED_URL" \
--update-channel nightly \
--update-valid-days 45
--update-sequence "$RELEASE_SEQUENCE"
{
printf 'Automated nightly from %s.\n\n' "$RELEASE_TARGET"
printf 'This prerelease is retained for fourteen nightly runs.\n'
} >"$RUNNER_TEMP/release-notes.md"
- name: Create draft, upload, download-verify, and publish
- name: Upload, download-verify, publish, and retain fourteen nightlies
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
@@ -159,17 +131,6 @@ jobs:
--artifacts dist \
--allow-missing-draft-tag \
--prerelease
- name: Retain fourteen Gitea nightly releases
shell: bash
env:
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
API_URL: ${{ gitea.api_url }}
REPOSITORY: ${{ gitea.repository }}
run: |
set -euo pipefail
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
python3 scripts/gitea_release.py \
--api-url "$API_URL" \
prune-nightlies \
@@ -179,63 +140,55 @@ jobs:
--keep 14 \
--protect-tag "$RELEASE_TAG"
- name: Check out the aggregate feed branch
- name: Check out release-feed over SSH
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: release-feed
path: feed-state
token: ${{ secrets.RELEASE_BOT_TOKEN }}
fetch-depth: 1
fetch-depth: 0
ssh-key: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
ssh-user: gitea
ssh-known-hosts: >-
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
- name: Sign and push the aggregate feed last
- name: Sign and push the nightly feed transaction
shell: bash
env:
FEED_PRIVATE_KEY: ${{ secrets.RELEASE_FEED_ED25519_PRIVATE_KEY }}
FEED_COMMIT_SIGNING_KEY: ${{ secrets.RELEASE_FEED_GIT_SIGNING_KEY }}
run: |
set -euo pipefail
key="$RUNNER_TEMP/echoion-release-2026-07.pem"
payload="$RUNNER_TEMP/echoion-runtime.payload.json"
envelope="$RUNNER_TEMP/echoion-runtime.json"
trap 'rm -f -- "$key" "$payload" "$envelope"' EXIT
feed_key="$RUNNER_TEMP/echoion-feed-ed25519.pem"
commit_key="$RUNNER_TEMP/echoion-feed-commit-key"
trap 'rm -f -- "$feed_key" "$commit_key"' EXIT
umask 077
printf '%s\n' "$FEED_PRIVATE_KEY" >"$key"
chmod 0600 "$key"
openssl pkey -in "$key" -noout
mkdir -p feed-state/feeds
existing=()
if [[ -s feed-state/feeds/echoion-runtime.json ]]; then
existing+=(
--existing-envelope feed-state/feeds/echoion-runtime.json
)
fi
python3 scripts/aggregate_update_feed.py \
--new-payload \
"dist/echoion-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/echoion-core-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/url-shortener-internal-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/url-shortener-external-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
"${existing[@]}" \
--public-key \
.gitea/release-keys/echoion-release-2026-07.pub.pem \
--private-key "$key" \
--key-id echoion-release-2026-07 \
printf '%s\n' "$FEED_PRIVATE_KEY" >"$feed_key"
printf '%s\n' "$FEED_COMMIT_SIGNING_KEY" >"$commit_key"
chmod 0600 "$feed_key" "$commit_key"
python3 scripts/publish-component-feeds.py \
--registry components.json \
--lock components.lock.json \
--artifacts dist/components \
--feed-root feed-state \
--base-url \
"${{ gitea.server_url }}/${{ gitea.repository }}/raw/branch/release-feed" \
--artifact-base-url "$RELEASE_ARTIFACT_BASE_URL" \
--channel nightly \
--sequence "$RELEASE_SEQUENCE" \
--valid-days 45 \
--nightly-retention 14 \
--output-payload "$payload" \
--output-envelope "$envelope"
install -m 0644 "$payload" \
feed-state/feeds/echoion-runtime.payload.json
install -m 0644 "$envelope" feed-state/feeds/echoion-runtime.json
--key-id echoion-release-2026-07 \
--private-key "$feed_key"
git -C feed-state config user.name 'Echoion Release Bot'
git -C feed-state config user.email 'release-bot@echoion.invalid'
git -C feed-state add \
feeds/echoion-runtime.json feeds/echoion-runtime.payload.json
git -C feed-state config gpg.format ssh
git -C feed-state config user.signingkey "$commit_key"
git -C feed-state config commit.gpgsign true
git -C feed-state add feeds/nightly state
if git -C feed-state diff --cached --quiet; then
exit 0
fi
git -C feed-state commit -m \
git -C feed-state commit -S -m \
"Feed: nightly ${RELEASE_VERSION}"
git -C feed-state cat-file commit HEAD |
grep -q '^gpgsig '
git -C feed-state push origin HEAD:release-feed
+79 -101
View File
@@ -1,4 +1,4 @@
name: Signed release
name: Signed modular release
on:
push:
@@ -8,6 +8,10 @@ on:
permissions:
contents: read
concurrency:
group: echoion-release-feed
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-24.04
@@ -21,7 +25,7 @@ jobs:
docker version
docker info
- name: Check out the signed tag
- name: Check out the signed root tag over SSH
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: ${{ gitea.ref }}
@@ -32,59 +36,38 @@ jobs:
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
persist-credentials: false
- name: Read locked component repositories
id: components
- name: Reject embedded component sources and gitlinks
shell: bash
run: |
set -euo pipefail
python3 - "$GITHUB_OUTPUT" <<'PY'
test ! -e .gitmodules
if git ls-files -s | awk '$1 == "160000" { found=1 } END { exit !found }'
then
echo "root release contains a gitlink" >&2
exit 1
fi
python3 - <<'PY'
import json
import pathlib
import sys
lock = json.loads(pathlib.Path("components.lock.json").read_text())
with pathlib.Path(sys.argv[1]).open("a") as output:
for component, key in (
("EchoionApi", "api"),
("EchoionCore", "core"),
("EchoionDesktop", "desktop"),
):
entry = lock["components"][component]
print(f"{key}_repository={entry['repository']}", file=output)
print(f"{key}_revision={entry['revision']}", file=output)
components = json.loads(pathlib.Path("components.json").read_text())
embedded = [
name for name in components["components"]
if pathlib.Path(name).exists()
]
if embedded:
raise SystemExit(f"embedded component sources: {embedded}")
PY
- name: Check out EchoionApi
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.api_repository }}
ref: ${{ steps.components.outputs.api_revision }}
path: EchoionApi
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out every locked component and dependency over SSH
shell: bash
env:
ECHOION_COMPONENT_SSH_KEY: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
run: >-
scripts/ci-checkout-components.sh
"$PWD/components"
"$PWD/dependencies"
- name: Check out EchoionCore
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.core_repository }}
ref: ${{ steps.components.outputs.core_revision }}
path: EchoionCore
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Check out EchoionDesktop
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
repository: ${{ steps.components.outputs.desktop_repository }}
ref: ${{ steps.components.outputs.desktop_revision }}
path: EchoionDesktop
fetch-depth: 1
token: ${{ secrets.RELEASE_BOT_TOKEN }}
persist-credentials: false
- name: Verify protected annotated SSH tag
- name: Verify protected annotated SSH tag and release lock
shell: bash
env:
TAG: ${{ gitea.ref_name }}
@@ -112,6 +95,9 @@ jobs:
--notes-output "$RUNNER_TEMP/release-notes.md"
)
printf 'RELEASE_TARGET=%s\n' "$target_commit" >>"$GITHUB_ENV"
scripts/prepare-release.sh \
--workspace "$PWD/components" \
--check
owner=${REPOSITORY%%/*}
repo=${REPOSITORY#*/}
python3 scripts/gitea_release.py \
@@ -121,13 +107,14 @@ jobs:
--repo "$repo" \
--required-pattern 'v*'
- name: Derive the stable or beta release
- name: Derive release channel and URLs
shell: bash
env:
TAG: ${{ gitea.ref_name }}
API_URL: ${{ gitea.api_url }}
SERVER_URL: ${{ gitea.server_url }}
REPOSITORY: ${{ gitea.repository }}
RUN_NUMBER: ${{ gitea.run_number }}
run: |
set -euo pipefail
version=${TAG#v}
@@ -140,39 +127,37 @@ jobs:
--cmake-file CMakeLists.txt
)
tag_base=${version%%[-+]*}
if [[ "$tag_base" != "$project_version" ]]; then
printf 'release tag %s does not match root CMake project version %s\n' \
"$TAG" "$project_version" >&2
exit 1
fi
test "$tag_base" = "$project_version"
channel=stable
prerelease=false
if [[ "$version" == *-* ]]; then
channel=beta
prerelease=true
fi
artifact="echoion-${version}-linux-x86_64.tar.zst"
url="${SERVER_URL}/${REPOSITORY}/releases/download/${TAG}/${artifact}"
feed_url="${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/echoion-runtime.json"
feed_url="${SERVER_URL}/${REPOSITORY}/raw/branch/release-feed/feeds/${channel}/catalog.json"
artifact_url="${SERVER_URL}/${REPOSITORY}/releases/download/${TAG}"
{
printf 'RELEASE_TAG=%s\n' "$TAG"
printf 'RELEASE_VERSION=%s\n' "$version"
printf 'RELEASE_CHANNEL=%s\n' "$channel"
printf 'RELEASE_PRERELEASE=%s\n' "$prerelease"
printf 'RELEASE_ARTIFACT_URL=%s\n' "$url"
printf 'RELEASE_SEQUENCE=%s\n' "$RUN_NUMBER"
printf 'RELEASE_ARTIFACT_BASE_URL=%s\n' "$artifact_url"
printf 'RELEASE_FEED_URL=%s\n' "$feed_url"
} >>"$GITHUB_ENV"
- name: Build and test the dynamic release in Docker
- name: Build, test, and package all locked repositories in Docker
shell: bash
run: |
set -euo pipefail
scripts/release.sh \
--version "$RELEASE_VERSION" \
--update-url "$RELEASE_ARTIFACT_URL" \
--component-workspace "$PWD/components" \
--void-source "$PWD/dependencies/VoidLibrary" \
--void-teamspeak-source "$PWD/dependencies/VoidTeamspeak" \
--official-update-feed-url "$RELEASE_FEED_URL" \
--update-channel "$RELEASE_CHANNEL" \
--update-valid-days 45
--update-sequence "$RELEASE_SEQUENCE"
- name: Create draft, upload, download-verify, and publish
shell: bash
@@ -200,63 +185,56 @@ jobs:
--artifacts dist \
"${prerelease[@]}"
- name: Check out the aggregate feed branch
- name: Check out the protected release-feed branch over SSH
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: release-feed
path: feed-state
token: ${{ secrets.RELEASE_BOT_TOKEN }}
fetch-depth: 1
fetch-depth: 0
ssh-key: ${{ secrets.RELEASE_CHECKOUT_SSH_KEY }}
ssh-user: gitea
ssh-known-hosts: >-
git.faumaray.ru ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCzZEz9JLrzk6oLiloSbueAN28vYL58Y/dTHBgRuBMMib9IJ1aDJShhr3kwC9sfOT0AzK0uwcMAqCAIkwJwttde8dIg0Mee0cmB/1JkoqFF4X3MUGD1r3nk8SSZNhIiPqo16hDF9Hf3FkovztIlBVntkyP9Iy9hYfP818Tiq3yRXROGdHjR7IfY4jR2QGfGrd/RtvPGExVqusxidy141240A8aRAwMFUqFdEvmXWjizrtCUqcrL/k1GEh0yJzbCdNOVUI6OuWd8tPluSBvmmeoNpKnCSl4Mkg36HObbOyrsme0asZqjcj0od65WYWApMPN0pUqhNu2CP83Nfor2VFwkdPRwe7cAZ0OD/8wyT6Hz5q1wWgf82y4tYDoDRYsd8JU86eebkJ07T5nCrEeC4Sj+qT4S5xv/kECAhxyP4QGnunORnY2fYsdNGzpPvbMN7gHe9UcIcQdOIgV3wrR1qpMVNcd8AEC2A3TRv/jzMCHSjmGGpgiy1Db2CZAjp5+PcjNmjvoPNN0NiA9X4rIVSeTfflWnDRmeNRJeZa73StjpU17EcAf97COUQPGWJQDgpJqINSpYU50fuaLBfzKnIRuiHjKQmyKe/zgRSmulnYFYM3AJfn8Ykg2VvkUQGvCt1+fqYiUa1iVFuwPP3ZigYF1mOZRpPnos5kaNmlB01q2sZw==
- name: Sign and push the aggregate feed last
- name: Sign and push the complete channel feed transaction
shell: bash
env:
FEED_PRIVATE_KEY: ${{ secrets.RELEASE_FEED_ED25519_PRIVATE_KEY }}
FEED_COMMIT_SIGNING_KEY: ${{ secrets.RELEASE_FEED_GIT_SIGNING_KEY }}
run: |
set -euo pipefail
key="$RUNNER_TEMP/echoion-release-2026-07.pem"
payload="$RUNNER_TEMP/echoion-runtime.payload.json"
envelope="$RUNNER_TEMP/echoion-runtime.json"
trap 'rm -f -- "$key" "$payload" "$envelope"' EXIT
feed_key="$RUNNER_TEMP/echoion-feed-ed25519.pem"
commit_key="$RUNNER_TEMP/echoion-feed-commit-key"
trap 'rm -f -- "$feed_key" "$commit_key"' EXIT
umask 077
printf '%s\n' "$FEED_PRIVATE_KEY" >"$key"
chmod 0600 "$key"
openssl pkey -in "$key" -noout
mkdir -p feed-state/feeds
existing=()
if [[ -s feed-state/feeds/echoion-runtime.json ]]; then
existing+=(
--existing-envelope feed-state/feeds/echoion-runtime.json
)
fi
python3 scripts/aggregate_update_feed.py \
--new-payload \
"dist/echoion-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/echoion-core-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/url-shortener-internal-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
--new-payload \
"dist/url-shortener-external-${RELEASE_VERSION}-linux-x86_64.update-payload.json" \
"${existing[@]}" \
--public-key \
.gitea/release-keys/echoion-release-2026-07.pub.pem \
--private-key "$key" \
--key-id echoion-release-2026-07 \
printf '%s\n' "$FEED_PRIVATE_KEY" >"$feed_key"
printf '%s\n' "$FEED_COMMIT_SIGNING_KEY" >"$commit_key"
chmod 0600 "$feed_key" "$commit_key"
openssl pkey -in "$feed_key" -noout
python3 scripts/publish-component-feeds.py \
--registry components.json \
--lock components.lock.json \
--artifacts dist/components \
--feed-root feed-state \
--base-url \
"${{ gitea.server_url }}/${{ gitea.repository }}/raw/branch/release-feed" \
--artifact-base-url "$RELEASE_ARTIFACT_BASE_URL" \
--channel "$RELEASE_CHANNEL" \
--sequence "$RELEASE_SEQUENCE" \
--valid-days 45 \
--nightly-retention 14 \
--output-payload "$payload" \
--output-envelope "$envelope"
install -m 0644 "$payload" \
feed-state/feeds/echoion-runtime.payload.json
install -m 0644 "$envelope" feed-state/feeds/echoion-runtime.json
--key-id echoion-release-2026-07 \
--private-key "$feed_key"
git -C feed-state config user.name 'Echoion Release Bot'
git -C feed-state config user.email 'release-bot@echoion.invalid'
git -C feed-state add \
feeds/echoion-runtime.json feeds/echoion-runtime.payload.json
git -C feed-state config gpg.format ssh
git -C feed-state config user.signingkey "$commit_key"
git -C feed-state config commit.gpgsign true
git -C feed-state add feeds state
if git -C feed-state diff --cached --quiet; then
exit 0
fi
git -C feed-state commit -m \
git -C feed-state commit -S -m \
"Feed: ${RELEASE_CHANNEL} ${RELEASE_VERSION}"
git -C feed-state cat-file commit HEAD |
grep -q '^gpgsig '
git -C feed-state push origin HEAD:release-feed