Skip to content

Commit c1568b3

Browse files
Split Linux and Windows into separate workflows
Add release-linux.yml specifically for building CUERipper.Avalonia on Linux. Remove the CUERipper.Avalonia build steps for Linux from release-windows.yml.
1 parent 7c2bb3b commit c1568b3

4 files changed

Lines changed: 76 additions & 13 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: release-linux
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
submodules: recursive
22+
- name: Install build tools
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y autoconf automake libtool-bin
26+
- name: Apply Patches
27+
run: ./git_init.sh
28+
- name: Publish CUERipper.Avalonia
29+
run: ./publish_linux64.sh
30+
- name: Get CUETools Version
31+
id: get_version
32+
run: |
33+
PRODUCTVER=$(grep 'CUEToolsVersion =' CUETools.Processor/CUESheet.cs | awk '{print $6}' | tr -d '";')
34+
echo "CUETools version: $PRODUCTVER"
35+
echo "CUETOOLS_VERSION=$PRODUCTVER" >> $GITHUB_ENV
36+
- name: Package CUERipper.Avalonia
37+
run: ./package_linux64.sh
38+
- name: Add artifacts to Release
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
name: CUETools ${{ env.CUETOOLS_VERSION }}
42+
body_path: CHANGELOG.md
43+
draft: false
44+
prerelease: false
45+
tag_name: ${{ github.ref_name }}
46+
files: |
47+
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.tar.gz
48+
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.tar.gz.sha256
49+

.github/workflows/release-windows.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- name: Apply patches
3535
# yamllint disable-line rule:line-length
3636
run: |
37+
git apply --directory=ThirdParty/flac ThirdParty/submodule_flac_CUETools.patch --verbose --whitespace=nowarn
3738
powershell -c "Expand-Archive ThirdParty/MAC_SDK/MAC_1086_SDK.zip -DestinationPath ThirdParty/MAC_SDK/"
3839
git apply --directory=ThirdParty/MAC_SDK ThirdParty/ThirdParty_MAC_SDK_CUETools.patch --verbose
3940
git apply --directory=ThirdParty/taglib-sharp ThirdParty/submodule_taglib-sharp_CUETools.patch --verbose
@@ -42,13 +43,6 @@ jobs:
4243
- name: MSBuild NuGet restore
4344
run: |
4445
"%MSBUILD_PATH%" "%SLN_PATH%" -t:restore -p:Configuration=Release
45-
- name: Publish CUERipper.Avalonia (Linux)
46-
shell: bash
47-
run: ./publish_linux64.sh
48-
- name: Apply Windows patches
49-
# yamllint disable-line rule:line-length
50-
run: |
51-
git apply --directory=ThirdParty/flac ThirdParty/submodule_flac_CUETools.patch --verbose --whitespace=nowarn
5246
- name: Build Release|Any CPU
5347
run: |
5448
"%DEVENV_PATH%" "%SLN_PATH%" /Build "Release|Any CPU"
@@ -102,6 +96,4 @@ jobs:
10296
CUETools.Lite_${{ env.CUETOOLS_VERSION }}.zip.sha256
10397
CUETools.CTDB.EACPlugin.${{ env.CUETOOLS_VERSION }}.zip
10498
CUETools.CTDB.EACPlugin.${{ env.CUETOOLS_VERSION }}.zip.sha256
105-
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.zip
106-
CUERipper.Linux64_${{ env.CUETOOLS_VERSION }}.zip.sha256
10799

package_linux64.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
if [[ -z "${CUETOOLS_VERSION:-}" ]]; then
5+
echo "CUETOOLS_VERSION hasn't been set."
6+
exit 1
7+
fi
8+
9+
if [[ ! -d ./bin/Publish/linux-x64 ]]; then
10+
echo "Where's the published directory?"
11+
exit 1
12+
fi
13+
14+
OUTPUT_NAME="CUERipper.Linux64_${CUETOOLS_VERSION}"
15+
TAR_FILE="${OUTPUT_NAME}.tar.gz"
16+
SHA_FILE="${OUTPUT_NAME}.tar.gz.sha256"
17+
18+
tar -czf "$TAR_FILE" -C ./bin/Publish/linux-x64 .
19+
20+
HASH=$(sha256sum "$TAR_FILE" | awk '{ print $1 }')
21+
echo "${HASH} *${TAR_FILE}" > "$SHA_FILE"
22+
23+

publish_linux64.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ set -euo pipefail
44
PUBLISH_BASE="./bin/Publish/linux-x64/CUERipper.Avalonia"
55
NATIVE_PLUGIN_BASE="$PUBLISH_BASE/plugins/x64"
66

7-
apt-get install -y autoconf automake libtool-bin
8-
97
mkdir -p "$NATIVE_PLUGIN_BASE"
108

119
# Compile libFLAC
@@ -44,8 +42,9 @@ find . -name "*.csproj" | while read -r csproj; do
4442
fi
4543

4644
echo "Publishing $csproj to $output"
47-
dotnet publish "$csproj" -f netstandard2.0 -c Release -r linux-x64 -o "$output"
45+
dotnet publish "$csproj" -f netstandard2.0 -c Release -r linux-x64 -o "$output" /p:DebugType=None /p:DebugSymbols=false
4846
fi
4947
done
5048

51-
dotnet publish ./CUERipper.Avalonia/CUERipper.Avalonia.csproj -f net8.0 -c Release -r linux-x64 -o "$PUBLISH_BASE"
49+
dotnet publish ./CUERipper.Avalonia/CUERipper.Avalonia.csproj -f net8.0 -c Release -r linux-x64 -o "$PUBLISH_BASE" /p:DebugType=None /p:DebugSymbols=false --self-contained true
50+

0 commit comments

Comments
 (0)