From 324dfa05c572af7855fc30ced3bf94ec2a9c8122 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Wed, 15 Apr 2026 16:24:18 +0300 Subject: [PATCH] ci: add RPM packaging for cortex and neuron - cortex.spec: gateway binary, cortex.service systemd unit, cortex.toml + models.toml config files - neuron.spec: neuron binary, neuron.service systemd unit, neuron.toml config file - Parallel CI: srpm-cortex and srpm-neuron jobs build SRPMs concurrently, then publish to separate COPR repos (helexa/cortex and helexa/neuron) - bump-version job: after both COPR publishes succeed, stamps tag version into Cargo.toml, specs, Cargo.lock and pushes to main via GITEA_TOKEN - Shared cortex user/group across both packages - Example configs: cortex.example.toml, neuron.example.toml, models.example.toml Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/ci.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8ab5270..5e7e147 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -134,7 +134,6 @@ jobs: name: Publish cortex to COPR runs-on: fedora needs: srpm-cortex - if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download SRPM uses: actions/download-artifact@v3 @@ -153,7 +152,6 @@ jobs: name: Publish neuron to COPR runs-on: fedora needs: srpm-neuron - if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download SRPM uses: actions/download-artifact@v3 @@ -167,3 +165,29 @@ jobs: - name: Submit build to COPR run: copr-cli build helexa/neuron *.src.rpm + + bump-version: + name: Bump version in source + runs-on: fedora + needs: [copr-cortex, copr-neuron] + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITEA_TOKEN }} + + - name: Stamp version and push + run: | + VERSION="${GITHUB_REF#refs/tags/v}" + sed -i '/\[workspace\.package\]/,/\[/{ s/^version = ".*"/version = "'"${VERSION}"'"/ }' Cargo.toml + sed -i "s/^Version:.*/Version: ${VERSION}/" cortex.spec + sed -i "s/^Version:.*/Version: ${VERSION}/" neuron.spec + cargo check --workspace 2>/dev/null || true + git config user.name "Gitea Actions" + git config user.email "actions@git.lair.cafe" + git add Cargo.toml Cargo.lock cortex.spec neuron.spec + if git diff --cached --quiet; then + echo "Version already at ${VERSION}" + else + git commit -m "chore: bump version to ${VERSION}" + git push origin HEAD:main + fi