Skip to content

Commit 6667ba8

Browse files
Add CUERipper Linux build to github workflow
1 parent 9230110 commit 6667ba8

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

.github/workflows/release-windows.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: Build Release|Win32
5353
run: |
5454
"%DEVENV_PATH%" "%SLN_PATH%" /Build "Release|Win32"
55+
- name: Publish CUERipper.Avalonia (Linux)
56+
shell: bash
57+
run: ./publish_linux64.sh
5558
- name: Collect files
5659
run: |
5760
collect_files.bat
@@ -96,3 +99,6 @@ jobs:
9699
CUETools.Lite_${{ env.CUETOOLS_VERSION }}.zip.sha256
97100
CUETools.CTDB.EACPlugin.${{ env.CUETOOLS_VERSION }}.zip
98101
CUETools.CTDB.EACPlugin.${{ env.CUETOOLS_VERSION }}.zip.sha256
102+
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.zip
103+
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.zip.sha256
104+

CUETools.Processor/CUESheet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class CUESheet
2828
{
2929
#region Fields
3030

31-
public const string CUEToolsVersion = "2.2.6c";
31+
public const string CUEToolsVersion = "2.2.6d";
3232

3333
private bool _stop, _pause;
3434
private List<CUELine> _attributes;

packaging.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Write-Output "Detected CUETools version: $version"
1616
$eacZip = "CUETools.CTDB.EACPlugin.$version.zip"
1717
$cuetoolsZip = "CUETools_$version.zip"
1818
$cuetoolsLiteZip = "CUETools.Lite_$version.zip"
19+
$cueRipperLinuxZip = "CUERipper.Linux64_$version.zip"
1920

2021
Write-Output "Creating EAC Zip"
2122
Compress-Archive -Path bin/Release/$($cueToolsDir.Name)/interop/ -DestinationPath $eacZip -Force
@@ -31,6 +32,9 @@ if (Test-Path $cuetoolsLiteFolder) {
3132
Write-Output "CUETools.Lite_$version not found, skip packaging."
3233
}
3334

35+
Write-Output "Creating CUERipper for Linux Zip"
36+
Compress-Archive -Path bin/Publish/linux-x64/CUERipper.Avalonia/ -DestinationPath $cueRipperLinuxZip -Force
37+
3438
# Generate a hashfile using the same format as previous releases
3539
Write-Output "Generating SHA256 hashes..."
3640
$eacHash = (Get-FileHash $eacZip -Algorithm SHA256).Hash.ToLower()
@@ -44,4 +48,7 @@ if (Test-Path $cuetoolsLiteFolder) {
4448
"$cuetoolsLiteHash *$cuetoolsLiteZip" | Out-File -Encoding ASCII "$cuetoolsLiteZip.sha256"
4549
}
4650

47-
Write-Output "Packaging complete."
51+
$cueripperLinuxHash = (Get-FileHash $cueRipperLinuxZip -Algorithm SHA256).Hash.ToLower()
52+
"$cueripperLinuxHash *$cueRipperLinuxZip" | Out-File -Encoding ASCII "$cueRipperLinuxZip.sha256"
53+
54+
Write-Output "Packaging complete."

publish_linux64.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
PUBLISH_BASE="./bin/Publish/linux-x64/CUERipper.Avalonia"
3+
4+
find . -name "*.csproj" | while read -r csproj; do
5+
if grep -q '<TargetFramework.*netstandard2\.0' "$csproj"; then
6+
echo "Checking $csproj"
7+
8+
if grep -q '<OutputPath>.*plugins' "$csproj"; then
9+
echo "Plugin"
10+
output="$PUBLISH_BASE/plugins"
11+
else
12+
echo "Non plugin"
13+
output="$PUBLISH_BASE"
14+
fi
15+
16+
echo "Publishing $csproj to $output"
17+
dotnet publish "$csproj" -f netstandard2.0 -c Release -r linux-x64 -o "$output"
18+
fi
19+
done
20+
21+
dotnet publish ./CUERipper.Avalonia/CUERipper.Avalonia.csproj -f net8.0 -c Release -r linux-x64 -o "$PUBLISH_BASE"

0 commit comments

Comments
 (0)