cd: update workflow and build command for Ubuntu 22.04 compatibility

This commit is contained in:
Kingkor Roy Tirtho 2025-01-24 14:19:44 +06:00
parent 8c0a47374d
commit 75e189344e
2 changed files with 11 additions and 7 deletions

View File

@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-22.04
platform: linux
arch: x86
files: |
@ -44,7 +44,7 @@ jobs:
files: |
dist/Spotube-linux-aarch64.deb
dist/spotube-linux-*-aarch64.tar.xz
- os: ubuntu-latest
- os: ubuntu-22.04
platform: android
arch: all
files: |
@ -127,7 +127,7 @@ jobs:
limit-access-to-actor: true
upload:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build_platform
steps:

View File

@ -47,7 +47,7 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
}
final tempDir = join(Directory.systemTemp.path, "spotube-tar");
final bundleArchName = architecture == "x86" ? "x86_64" : "aarch64";
final bundleDirPath = join(
cwd.path,
"build",
@ -62,7 +62,7 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
"dist",
"spotube-linux-"
"${CliEnv.channel == BuildChannel.nightly ? "nightly" : versionWithoutBuildNumber}"
"-${architecture == "x86" ? "x86_64" : "aarch64"}.tar.xz",
"-$bundleArchName.tar.xz",
));
await copyPath(bundleDirPath, tempDir);
@ -91,7 +91,11 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
),
);
await ogDeb.copy(
join(cwd.path, "dist", "Spotube-linux-x86_64.deb"),
join(
cwd.path,
"dist",
"Spotube-linux-$bundleArchName.deb",
),
);
await ogDeb.delete();
@ -106,7 +110,7 @@ class LinuxBuildCommand extends Command with BuildCommandCommonSteps {
);
await ogRpm.copy(
join(cwd.path, "dist", "Spotube-linux-x86_64.rpm"),
join(cwd.path, "dist", "Spotube-linux-$bundleArchName.rpm"),
);
await ogRpm.delete();