From c1592fdc75f4f8fc0aba05c7ea972aeeedf1be90 Mon Sep 17 00:00:00 2001 From: cneicy Date: Sat, 5 Sep 2026 04:01:15 +0800 Subject: [PATCH] ci: provide OpenSSL for .NET packaging --- .gitea/workflows/publish-nuget.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml index 83edaaf..1b18a2f 100644 --- a/.gitea/workflows/publish-nuget.yml +++ b/.gitea/workflows/publish-nuget.yml @@ -16,6 +16,7 @@ jobs: NUGET_AUTH_TOKEN: ${{ secrets.SHRINKSDK_PACKAGE_TOKEN }} DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: '1' DOTNET_CLI_TELEMETRY_OPTOUT: '1' + LD_LIBRARY_PATH: /opt/dotnet-libs/usr/lib/x86_64-linux-gnu steps: - name: Fetch exact tagged source env: @@ -61,10 +62,24 @@ jobs: const archiveResponse = await fetch(file.url); if (!archiveResponse.ok) throw new Error(`SDK download failed: ${archiveResponse.status}`); await writeFile('/tmp/dotnet-sdk.tar.gz', new Uint8Array(await archiveResponse.arrayBuffer())); + + const poolUrl = 'https://deb.debian.org/debian-security/pool/updates/main/o/openssl/'; + const poolResponse = await fetch(poolUrl); + if (!poolResponse.ok) throw new Error(`OpenSSL package index download failed: ${poolResponse.status}`); + const poolIndex = await poolResponse.text(); + const packages = [...poolIndex.matchAll(/href="(libssl3_[^"]+_amd64\.deb)"/g)].map(match => match[1]).sort(); + const packageName = packages.at(-1); + if (!packageName) throw new Error('Debian libssl3 package was not found'); + const packageResponse = await fetch(poolUrl + packageName); + if (!packageResponse.ok) throw new Error(`OpenSSL package download failed: ${packageResponse.status}`); + await writeFile('/tmp/libssl3.deb', new Uint8Array(await packageResponse.arrayBuffer())); NODE mkdir -p /opt/dotnet tar -xzf /tmp/dotnet-sdk.tar.gz -C /opt/dotnet + mkdir -p /opt/dotnet-libs + dpkg-deb -x /tmp/libssl3.deb /opt/dotnet-libs rm -f /tmp/dotnet-sdk.tar.gz + rm -f /tmp/libssl3.deb /opt/dotnet/dotnet --info - name: Validate, pack and publish