Release: cut over Echoion 2.0 components
Modular container CI / release-build (push) Has been cancelled
Modular container CI / release-build (push) Has been cancelled
This commit is contained in:
169 files changed
+3069
-32261
No files matched your search
+39
-65
@@ -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
@@ -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
@@ -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
|
||||
Reference in new issue
Block a user