Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ jobs:
exit 1
fi

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main

- name: Setup Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Build WASM Package
run: nix develop --command bash -c "cd packages/@postgres-language-server/wasm && bun run build"

- name: Generate Packages (deprecated)
id: generate-packages-deprecated
run: node packages/@postgrestools/postgrestools/scripts/generate-packages.mjs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function downloadBinary(platform, arch, os, releaseTag, githubToken) {
console.log(`Downloaded asset for ${buildName} (v${releaseTag})`);
}

async function writeManifest(packagePath, version) {
async function writeManifest(packagePath, version, { versionOnly = false } = {}) {
const manifestPath = resolve(
PACKAGES_PGLS_ROOT,
packagePath,
Expand All @@ -102,12 +102,14 @@ async function writeManifest(packagePath, version) {
fs.readFileSync(manifestPath).toString("utf-8")
);

const nativePackages = platformArchCombinations().map(
({ platform, arch }) => [getPackageName(platform, arch), version]
);

manifestData.version = version;
manifestData.optionalDependencies = Object.fromEntries(nativePackages);

if (!versionOnly) {
const nativePackages = platformArchCombinations().map(
({ platform, arch }) => [getPackageName(platform, arch), version]
);
manifestData.optionalDependencies = Object.fromEntries(nativePackages);
}

console.log(`Update manifest ${manifestPath}`);
const content = JSON.stringify(manifestData, null, 2);
Expand Down Expand Up @@ -276,6 +278,7 @@ function getVersion(releaseTag, isPrerelease) {
const version = getVersion(releaseTag, isPrerelease);
await writeManifest("cli", version);
await writeManifest("backend-jsonrpc", version);
await writeManifest("wasm", version, { versionOnly: true });

// Copy README to main packages
copyReadmeToPackage("cli");
Expand Down
Loading