@@ -67,12 +67,55 @@ jobs:
6767 floki*.zip
6868 floki*.tar.gz
6969
70+
71+ rpm :
72+ name : Build and test RPM using cargo generate-rpm
73+ runs-on : ubuntu-24.04
74+ needs : build
75+ steps :
76+ - uses : actions/checkout@v5
77+ - name : Install rust
78+ uses : dtolnay/rust-toolchain@master
79+ with :
80+ toolchain : stable
81+ - name : Install cargo-generate-rpm
82+ run : cargo install cargo-generate-rpm
83+ # Download the ubuntu artifact instead of rebuilding.
84+ - name : Download artifacts
85+ uses : actions/download-artifact@v4
86+ with :
87+ name : stableartifacts-ubuntu-24.04
88+ - name : Build RPM
89+ run : |
90+ tar -xzvf floki*.tar.gz
91+ mkdir -p target/release
92+ cp floki target/release/floki
93+ cargo generate-rpm
94+ - name : Debug
95+ run : |
96+ set -ex
97+
98+ ls -ltR .
99+ ls -l /usr/bin
100+
101+ - name : Install RPM
102+ run : find . -name "floki*.rpm" | xargs sudo rpm -ivh
103+ - name : Test installation
104+ run : floki -V
105+ - name : Archive artifacts
106+ uses : actions/upload-artifact@v4
107+ with :
108+ name : rpm
109+ path : |
110+ target/generate-rpm/floki*.rpm
111+
70112 publish :
71113 name : Publish release artifact
72114 runs-on : ubuntu-latest
73115 if : github.ref_type == 'tag'
74116 needs :
75117 - build
118+ - rpm
76119 # Required to publish a release
77120 permissions :
78121 contents : write
@@ -97,6 +140,10 @@ jobs:
97140 uses : actions/download-artifact@v5
98141 with :
99142 name : stableartifacts-macos-latest
143+ - name : Download RPM
144+ uses : actions/download-artifact@v5
145+ with :
146+ name : rpm
100147 - name : Generate release.txt
101148 run : " ./changelog.sh"
102149 - name : Release
@@ -106,6 +153,7 @@ jobs:
106153 files : |
107154 floki*.zip
108155 floki*.tar.gz
156+ floki*.rpm
109157 # # Announce the release
110158 # - run: "./announce.sh"
111159 # env:
@@ -117,6 +165,7 @@ jobs:
117165 if : github.ref_type != 'tag'
118166 needs :
119167 - build
168+ - rpm
120169 steps :
121170 - uses : actions/checkout@v5
122171 - name : Install rust
@@ -136,6 +185,10 @@ jobs:
136185 uses : actions/download-artifact@v5
137186 with :
138187 name : stableartifacts-macos-latest
188+ - name : Download rpm
189+ uses : actions/download-artifact@v5
190+ with :
191+ name : rpm
139192 # Test generating release.txt
140193 - name : Generate release.txt
141194 run : " ./changelog.sh"
0 commit comments