@@ -147,16 +147,8 @@ jobs:
147147 if : " !matrix.skip_tests"
148148 run : ${{ env.CARGO }} test --release --locked --target ${{ matrix.target }} --workspace
149149
150- - name : Set profile.release.strip = true
151- shell : bash
152- run : |
153- cat >> .cargo/config.toml <<EOF
154- [profile.release]
155- strip = true
156- EOF
157-
158150 - name : Build release binary
159- run : ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }}
151+ run : ${{ env.CARGO }} build --profile opt --locked --target ${{ matrix.target }}
160152
161153 - name : Build AppImage
162154 shell : bash
@@ -183,7 +175,7 @@ jobs:
183175
184176 mkdir -p "$APP.AppDir"/usr/{bin,lib/helix}
185177
186- cp "target/${{ matrix.target }}/release /hx" "$APP.AppDir/usr/bin/hx"
178+ cp "target/${{ matrix.target }}/opt /hx" "$APP.AppDir/usr/bin/hx"
187179 rm -rf runtime/grammars/sources
188180 cp -r runtime "$APP.AppDir/usr/lib/helix/runtime"
189181
@@ -206,14 +198,25 @@ jobs:
206198 mv "$APP-$VERSION-$ARCH.AppImage" \
207199 "$APP-$VERSION-$ARCH.AppImage.zsync" dist
208200
201+ - name : Build Deb
202+ shell : bash
203+ if : matrix.build == 'x86_64-linux'
204+ run : |
205+ cargo install cargo-deb
206+ mkdir -p target/release
207+ cp target/${{ matrix.target }}/opt/hx target/release/
208+ cargo deb --no-build
209+ mkdir -p dist
210+ mv target/debian/*.deb dist/
211+
209212 - name : Build archive
210213 shell : bash
211214 run : |
212215 mkdir -p dist
213216 if [ "${{ matrix.os }}" = "windows-2019" ]; then
214- cp "target/${{ matrix.target }}/release /hx.exe" "dist/"
217+ cp "target/${{ matrix.target }}/opt /hx.exe" "dist/"
215218 else
216- cp "target/${{ matrix.target }}/release /hx" "dist/"
219+ cp "target/${{ matrix.target }}/opt /hx" "dist/"
217220 fi
218221 if [ -d runtime/grammars/sources ]; then
219222 rm -rf runtime/grammars/sources
@@ -241,6 +244,7 @@ jobs:
241244 set -ex
242245
243246 source="$(pwd)"
247+ tag=${GITHUB_REF_NAME//\//}
244248 mkdir -p runtime/grammars/sources
245249 tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources
246250 rm -rf grammars
@@ -254,7 +258,7 @@ jobs:
254258 if [[ $platform =~ "windows" ]]; then
255259 exe=".exe"
256260 fi
257- pkgname=helix-$GITHUB_REF_NAME -$platform
261+ pkgname=helix-$tag -$platform
258262 mkdir -p $pkgname
259263 cp $source/LICENSE $source/README.md $pkgname
260264 mkdir $pkgname/contrib
@@ -265,6 +269,7 @@ jobs:
265269
266270 if [[ "$platform" = "x86_64-linux" ]]; then
267271 mv bins-$platform/helix-*.AppImage* dist/
272+ mv bins-$platform/*.deb dist/
268273 fi
269274
270275 if [ "$exe" = "" ]; then
@@ -274,7 +279,7 @@ jobs:
274279 fi
275280 done
276281
277- tar cJf dist/helix-$GITHUB_REF_NAME -source.tar.xz -C $source .
282+ tar cJf dist/helix-$tag -source.tar.xz -C $source .
278283 mv dist $source/
279284
280285 - name : Upload binaries to release
0 commit comments