From 6d3dca17fa63e2c95e726d4150709e49e494c328 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Mon, 27 Apr 2026 10:39:14 +0300 Subject: [PATCH] feat(ci): generate rpm changelog from upstream mistral.rs commits Use actions/rpm-changelog@v1 with repo-url to collect commits from the upstream mistral.rs repo between release tags and prepend a changelog entry to the spec file before building the RPM. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build-release.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build-release.yml b/.gitea/workflows/build-release.yml index b7902b9..70fca0e 100644 --- a/.gitea/workflows/build-release.yml +++ b/.gitea/workflows/build-release.yml @@ -87,21 +87,32 @@ jobs: name: mistralrs-server-${{ matrix.name }}-fc${{ matrix.fedora_version }} path: artifacts/ + - name: Determine version + id: version + run: | + echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" + env: + TAG: ${{ inputs.tag }} + + - name: Generate changelog + uses: https://git.lair.cafe/actions/rpm-changelog@v1 + with: + spec: rpm/mistralrs.spec + version: ${{ steps.version.outputs.version }} + repo-url: https://github.com/EricLBuehler/mistral.rs.git + - name: Build RPM run: | rm -f ~/.rpmmacros - version="${TAG#v}" rpmdev-setuptree cp artifacts/mistralrs-server-${{ matrix.name }} ~/rpmbuild/SOURCES/ cp rpm/systemd/mistralrs@.service ~/rpmbuild/SOURCES/ cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/ rpmbuild -bb rpm/mistralrs.spec \ - --define "mistralrs_version ${version}" \ + --define "mistralrs_version ${{ steps.version.outputs.version }}" \ --define "mistralrs_flavour ${{ matrix.name }}" \ --undefine dist \ --define "dist .fc${{ matrix.fedora_version }}" - env: - TAG: ${{ inputs.tag }} - name: Upload RPM uses: actions/upload-artifact@v3