Skip to content

Commit d9fb580

Browse files
committed
Releases trim
1 parent 2f8a920 commit d9fb580

1 file changed

Lines changed: 9 additions & 255 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 255 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,6 @@ jobs:
3232
with:
3333
dotnet-version: ${{ env.DOTNET_VERSION }}
3434

35-
- name: Install modern archive tooling
36-
run: |
37-
sudo apt-get update
38-
sudo apt-get install -y zstd
39-
40-
- name: Install distro packaging tools
41-
run: |
42-
sudo apt-get install -y ruby ruby-dev rpm
43-
sudo gem install --no-document fpm
44-
45-
- name: Install Flatpak tooling
46-
run: |
47-
sudo apt-get install -y flatpak flatpak-builder
48-
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
49-
flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
50-
51-
- name: Install AppImage tooling
52-
run: |
53-
sudo apt-get install -y libfuse2
54-
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
55-
chmod +x appimagetool
56-
57-
- name: Install Snap tooling
58-
run: |
59-
sudo snap install snapcraft --classic
60-
61-
- name: Start snapd
62-
run: |
63-
sudo systemctl start snapd || true
64-
sudo snap wait system seed.loaded || true
65-
6635
- name: Restore dependencies
6736
run: dotnet restore -r linux-x64
6837

@@ -114,124 +83,15 @@ jobs:
11483
--mainExe BusLane \
11584
--runtime linux-x64 \
11685
--channel linux-x64 \
86+
--delta None \
11787
--icon BusLane/Assets/icon.png
11888
119-
- name: Create archive
120-
run: |
121-
cd publish
122-
tar -czvf ../BusLane-${{ steps.version.outputs.version }}-linux-x64.tar.gz .
123-
tar --zstd -cvf ../BusLane-${{ steps.version.outputs.version }}-linux-x64.tar.zst .
124-
125-
- name: Create Linux distro packages
126-
run: |
127-
VERSION="${{ steps.version.outputs.version }}"
128-
ITERATION="1"
129-
CLEAN_VERSION="${VERSION%%-*}"
130-
if [ "$CLEAN_VERSION" != "$VERSION" ]; then
131-
ITERATION="${VERSION#*-}"
132-
ITERATION="${ITERATION//[^a-zA-Z0-9.]/.}"
133-
fi
134-
135-
fpm -s dir -t deb \
136-
-n buslane \
137-
-v "$CLEAN_VERSION" \
138-
--iteration "$ITERATION" \
139-
--architecture amd64 \
140-
--description "Azure Service Bus Manager" \
141-
--url "https://github.com/${{ github.repository }}" \
142-
--license "MIT" \
143-
--maintainer "BusLane" \
144-
--depends libgtk-3-0 \
145-
--depends libx11-6 \
146-
--depends libxkbcommon0 \
147-
--depends libgbm1 \
148-
--depends libasound2 \
149-
--depends "libicu74 | libicu72 | libicu71" \
150-
--depends libssl3 \
151-
--prefix /opt/buslane \
152-
-C publish \
153-
--package "BusLane-${VERSION}-linux-x64.deb" \
154-
.
155-
156-
fpm -s dir -t rpm \
157-
-n buslane \
158-
-v "$CLEAN_VERSION" \
159-
--iteration "$ITERATION" \
160-
--architecture x86_64 \
161-
--description "Azure Service Bus Manager" \
162-
--url "https://github.com/${{ github.repository }}" \
163-
--license "MIT" \
164-
--maintainer "BusLane" \
165-
--depends gtk3 \
166-
--depends libX11 \
167-
--depends libxkbcommon \
168-
--depends mesa-libgbm \
169-
--depends alsa-lib \
170-
--depends libicu \
171-
--depends openssl-libs \
172-
--prefix /opt/buslane \
173-
-C publish \
174-
--package "BusLane-${VERSION}-linux-x64.rpm" \
175-
.
176-
177-
- name: Create Flatpak bundle
178-
run: |
179-
VERSION="${{ steps.version.outputs.version }}"
180-
flatpak-builder --force-clean --repo=flatpak-repo flatpak-build packaging/flatpak/org.buslane.BusLane.yml
181-
flatpak build-bundle flatpak-repo "BusLane-${VERSION}-linux-x64.flatpak" org.buslane.BusLane
182-
183-
- name: Create AppImage bundle
184-
run: |
185-
VERSION="${{ steps.version.outputs.version }}"
186-
APPDIR="BusLane.AppDir"
187-
188-
rm -rf "$APPDIR"
189-
mkdir -p "$APPDIR/usr/bin"
190-
mkdir -p "$APPDIR/usr/share/applications"
191-
mkdir -p "$APPDIR/usr/share/icons/hicolor/256x256/apps"
192-
193-
cp publish/BusLane "$APPDIR/usr/bin/BusLane"
194-
cp packaging/appimage/BusLane.desktop "$APPDIR/usr/share/applications/BusLane.desktop"
195-
cp BusLane/Assets/icon.png "$APPDIR/usr/share/icons/hicolor/256x256/apps/BusLane.png"
196-
197-
cat > "$APPDIR/AppRun" << 'EOF'
198-
#!/bin/sh
199-
SELF_DIR="$(dirname "$(readlink -f "$0")")"
200-
exec "$SELF_DIR/usr/bin/BusLane" "$@"
201-
EOF
202-
chmod +x "$APPDIR/AppRun"
203-
204-
cp packaging/appimage/BusLane.desktop "$APPDIR/BusLane.desktop"
205-
cp BusLane/Assets/icon.png "$APPDIR/BusLane.png"
206-
207-
ARCH=x86_64 ./appimagetool "$APPDIR" "BusLane-${VERSION}-linux-x64.AppImage"
208-
209-
- name: Create Snap package
210-
run: |
211-
VERSION="${{ steps.version.outputs.version }}"
212-
pushd packaging/snap
213-
cp snapcraft.yaml snapcraft.yaml.bak
214-
sed -i "s/^version: '0.0.0'/version: '${VERSION}'/" snapcraft.yaml
215-
snapcraft pack --destructive-mode --output "../../BusLane-${VERSION}-linux-x64.snap" || true
216-
mv snapcraft.yaml.bak snapcraft.yaml
217-
popd
218-
continue-on-error: true
219-
22089
- name: Upload artifact
22190
uses: actions/upload-artifact@v7
22291
with:
22392
name: BusLane-${{ steps.version.outputs.version }}-linux-x64
224-
path: |
225-
BusLane-${{ steps.version.outputs.version }}-linux-x64.tar.gz
226-
BusLane-${{ steps.version.outputs.version }}-linux-x64.tar.zst
227-
BusLane-${{ steps.version.outputs.version }}-linux-x64.deb
228-
BusLane-${{ steps.version.outputs.version }}-linux-x64.rpm
229-
BusLane-${{ steps.version.outputs.version }}-linux-x64.flatpak
230-
BusLane-${{ steps.version.outputs.version }}-linux-x64.AppImage
231-
BusLane-${{ steps.version.outputs.version }}-linux-x64.snap
232-
Releases/**
93+
path: Releases/**
23394
retention-days: 30
234-
if-no-files-found: warn
23595

23696
build-windows:
23797
runs-on: windows-latest
@@ -306,44 +166,15 @@ jobs:
306166
--mainExe BusLane.exe `
307167
--runtime win-x64 `
308168
--channel win-x64 `
169+
--delta None `
170+
--noPortable `
309171
--icon BusLane/Assets/icon.ico
310172
311-
- name: Create archive
312-
run: |
313-
Compress-Archive -Path ./publish/* -DestinationPath ./BusLane-${{ steps.version.outputs.version }}-win-x64.zip
314-
315-
- name: Install Inno Setup
316-
run: |
317-
choco install innosetup -y
318-
319-
- name: Create Inno Setup installer
320-
run: |
321-
# Replace version placeholder in ISS file
322-
(Get-Content ./installer.iss) -replace '\{\{APP_VERSION\}\}', '${{ steps.version.outputs.version }}' | Set-Content ./installer.iss
323-
324-
# Build the installer
325-
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" ./installer.iss
326-
327-
# List Output directory contents for debugging
328-
Write-Output "Output directory contents:"
329-
Get-ChildItem -Path ./Output -Recurse | Select-Object FullName, Length
330-
331-
# Move installer to root (output goes to Output folder by default)
332-
if (Test-Path "./Output") {
333-
Move-Item -Path "./Output/*" -Destination "./" -Force -Include "*.exe"
334-
}
335-
336-
# Verify installer exists
337-
Get-ChildItem -Path . -Filter "*setup.exe" | Select-Object Name, Length
338-
339173
- name: Upload artifacts
340174
uses: actions/upload-artifact@v7
341175
with:
342176
name: BusLane-${{ steps.version.outputs.version }}-win-x64
343-
path: |
344-
BusLane-${{ steps.version.outputs.version }}-win-x64.zip
345-
*setup.exe
346-
Releases/**
177+
path: Releases/**
347178
retention-days: 30
348179

349180
build-macos:
@@ -418,81 +249,15 @@ jobs:
418249
--mainExe BusLane \
419250
--runtime ${{ matrix.runtime }} \
420251
--channel ${{ matrix.runtime }} \
252+
--delta None \
253+
--noPortable \
421254
--icon BusLane/Assets/icon.icns
422255
423-
- name: Create macOS App Bundle
424-
run: |
425-
APP_NAME="BusLane"
426-
APP_BUNDLE="${APP_NAME}.app"
427-
428-
# Create app bundle structure
429-
mkdir -p "${APP_BUNDLE}/Contents/MacOS"
430-
mkdir -p "${APP_BUNDLE}/Contents/Resources"
431-
432-
# Copy published files to MacOS folder
433-
cp -R ./publish/* "${APP_BUNDLE}/Contents/MacOS/"
434-
435-
# Remove runtime config files that might cause the app to look for .NET SDK
436-
# For single-file self-contained apps, these are embedded and external files should be removed
437-
rm -f "${APP_BUNDLE}/Contents/MacOS/"*.runtimeconfig.json 2>/dev/null || true
438-
rm -f "${APP_BUNDLE}/Contents/MacOS/"*.deps.json 2>/dev/null || true
439-
440-
# Copy Info.plist (from BusLane project folder)
441-
cp BusLane/Info.plist "${APP_BUNDLE}/Contents/"
442-
443-
# Copy icon (from BusLane/Assets folder)
444-
cp BusLane/Assets/icon.icns "${APP_BUNDLE}/Contents/Resources/icon.icns"
445-
446-
# Make the main executable executable
447-
chmod +x "${APP_BUNDLE}/Contents/MacOS/BusLane"
448-
449-
# Create PkgInfo file
450-
echo -n "APPL????" > "${APP_BUNDLE}/Contents/PkgInfo"
451-
452-
# Remove extended attributes that might cause Gatekeeper issues
453-
xattr -cr "${APP_BUNDLE}"
454-
455-
# Ad-hoc code sign the app bundle
456-
codesign --force --deep --sign - "${APP_BUNDLE}"
457-
458-
- name: Install create-dmg
459-
run: |
460-
brew install create-dmg
461-
462-
- name: Convert DMG background SVG to PNG
463-
run: |
464-
# Use qlmanage (Quick Look) to convert SVG to PNG on macOS
465-
# This handles SVG with gradients and text properly
466-
cd BusLane/Assets
467-
qlmanage -t -s 540 -o . dmg-background.svg
468-
mv dmg-background.svg.png dmg-background.png 2>/dev/null || true
469-
470-
- name: Create DMG installer
471-
run: |
472-
APP_NAME="BusLane"
473-
DMG_NAME="BusLane-${{ steps.version.outputs.version }}-osx-${{ matrix.arch }}"
474-
475-
# Create DMG with pretty background and layout
476-
create-dmg \
477-
--volname "${APP_NAME}" \
478-
--volicon "BusLane/Assets/icon.icns" \
479-
--background "BusLane/Assets/dmg-background.png" \
480-
--window-pos 200 120 \
481-
--window-size 540 380 \
482-
--icon-size 80 \
483-
--icon "${APP_NAME}.app" 130 200 \
484-
--hide-extension "${APP_NAME}.app" \
485-
--app-drop-link 410 200 \
486-
--no-internet-enable \
487-
"${DMG_NAME}.dmg" \
488-
"${APP_NAME}.app"
489-
- name: Upload DMG artifact
256+
- name: Upload artifacts
490257
uses: actions/upload-artifact@v7
491258
with:
492259
name: BusLane-${{ steps.version.outputs.version }}-${{ matrix.runtime }}
493-
path: |
494-
BusLane-${{ steps.version.outputs.version }}-osx-${{ matrix.arch }}.dmg
495-
Releases/**
260+
path: Releases/**
496261
retention-days: 30
497262

498263
create-release:
@@ -531,17 +296,6 @@ jobs:
531296
uses: softprops/action-gh-release@v2
532297
with:
533298
tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', github.event.inputs.version) || github.ref_name }}
534-
files: |
535-
artifacts/*/*.tar.gz
536-
artifacts/*/*.tar.zst
537-
artifacts/*/*.zip
538-
artifacts/*/*.dmg
539-
artifacts/*/*.exe
540-
artifacts/*/*.deb
541-
artifacts/*/*.rpm
542-
artifacts/*/*.flatpak
543-
artifacts/*/*.AppImage
544-
artifacts/*/*.snap
545299
generate_release_notes: true
546300
draft: false
547301
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.event.inputs.version, 'alpha') || contains(github.event.inputs.version, 'beta') || contains(github.event.inputs.version, 'rc') }}

0 commit comments

Comments
 (0)