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

View File

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