Skip to content

Commit 2c67e47

Browse files
committed
removed leftover references to Vercel Blob
1 parent 93d5cb5 commit 2c67e47

File tree

2 files changed

+15
-49
lines changed

2 files changed

+15
-49
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ jobs:
7171
uses: actions/upload-artifact@v4
7272
with:
7373
name: tar-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}
74-
path: /tmp/pocket-server-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}.tar.gz
74+
path: pocket-server-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}.tar.gz
7575
if-no-files-found: error
7676
- name: Upload sha256 artifact
7777
uses: actions/upload-artifact@v4
7878
with:
7979
name: sha-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}
80-
path: /tmp/pocket-server-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}.tar.gz.sha256
80+
path: pocket-server-${{ matrix.TARGET_OS }}-${{ matrix.TARGET_ARCH }}.tar.gz.sha256
8181
if-no-files-found: error
8282
- name: Upload metadata artifact
8383
uses: actions/upload-artifact@v4

scripts/release.mjs

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { mkdirSync, rmSync, cpSync, readFileSync, writeFileSync, createReadStrea
44
import { tmpdir } from 'node:os';
55
import { join, resolve } from 'node:path';
66
import { createHash } from 'node:crypto';
7-
import { put } from '@vercel/blob';
87

98
function exec(cmd, opts = {}) {
109
return execSync(cmd, { stdio: 'inherit', ...opts });
@@ -24,11 +23,7 @@ async function main() {
2423
const repoRoot = resolve(process.cwd());
2524
const serverDir = repoRoot; // server repo root
2625

27-
const token = process.env.BLOB_READ_WRITE_TOKEN;
28-
if (!token) {
29-
console.error('Missing env BLOB_READ_WRITE_TOKEN');
30-
process.exit(1);
31-
}
26+
// No external uploads here; this script only builds artifacts in CI.
3227

3328
// Target selection (defaults to host platform/arch). Allows CI matrix to override.
3429
const targetOs = process.env.TARGET_OS || (process.platform === 'darwin' ? 'darwin' : (process.platform === 'linux' ? 'linux' : 'darwin'));
@@ -131,48 +126,19 @@ async function main() {
131126
console.log(`[release] Packed ${(s.size/1024/1024).toFixed(1)} MB, sha256=${digest.slice(0,8)}...`);
132127
} catch {}
133128

134-
// If artifacts-only mode, stop here after writing files; the workflow will upload
135-
136-
if (publishMode === 'full') {
137-
// Legacy single-arch publish: upload directly to Blob (kept for local use only)
138-
const artifactPath = `pocket-server/${version}/pocket-server-${osArchKey}.tar.gz`;
139-
console.log(`[release] Uploading to Blob: ${artifactPath} ...`);
140-
const { url: tgzUrl } = await put(artifactPath, readFileSync(outTgz), {
141-
access: 'public', addRandomSuffix: false, token, contentType: 'application/gzip', cacheControlMaxAge: 31536000,
142-
});
143-
await put(`${artifactPath}.sha256`, readFileSync(shaPath), {
144-
access: 'public', addRandomSuffix: false, token, contentType: 'text/plain', cacheControlMaxAge: 31536000,
145-
});
146-
console.log(`[release] Upload complete: ${tgzUrl}`);
147-
// Build manifest with only this target (legacy single-arch behavior)
148-
const manifest = {
149-
version,
150-
node: nodeVersion,
151-
files: {
152-
[osArchKey]: { url: tgzUrl, sha256: digest },
153-
}
154-
};
155-
156-
const { url: uploadedManifestUrl } = await put('pocket-server/latest.json', Buffer.from(JSON.stringify(manifest, null, 2)), {
157-
access: 'public', addRandomSuffix: false, allowOverwrite: true, token, contentType: 'application/json', cacheControlMaxAge: 60,
158-
});
159-
160-
console.log('\nRelease completed');
161-
console.log('Version:', version);
162-
console.log('Tarball:', tgzUrl);
163-
console.log('Manifest:', uploadedManifestUrl);
164-
console.log('\nSet INSTALL_MANIFEST_URL to the Manifest URL if not already set.');
165-
} else {
166-
// Artifacts-only: write metadata JSON for the aggregator
167-
if (metadataPath) {
168-
const meta = { version, node: nodeVersion, os: targetOs, arch: targetArch, url: '', sha256: digest };
169-
writeFileSync(metadataPath, JSON.stringify(meta, null, 2));
170-
console.log(`[release] Wrote metadata: ${metadataPath}`);
171-
}
172-
console.log('\nArtifact upload completed');
173-
console.log('Version:', version);
174-
console.log('Tarball:', tgzUrl);
129+
// Make artifacts available at a stable path (repo root) for the workflow to upload
130+
const outTgzRepo = join(repoRoot, `pocket-server-${osArchKey}.tar.gz`);
131+
const shaPathRepo = `${outTgzRepo}.sha256`;
132+
try { cpSync(outTgz, outTgzRepo); } catch {}
133+
try { writeFileSync(shaPathRepo, `${digest}`); } catch {}
134+
135+
// Write metadata JSON for the publish step
136+
if (metadataPath) {
137+
const meta = { version, node: nodeVersion, os: targetOs, arch: targetArch, url: '', sha256: digest };
138+
writeFileSync(metadataPath, JSON.stringify(meta, null, 2));
139+
console.log(`[release] Wrote metadata: ${metadataPath}`);
175140
}
141+
console.log(`\nArtifacts ready:\n ${outTgzRepo}\n ${shaPathRepo}`);
176142
}
177143

178144
main().catch((e) => { console.error(e); process.exit(1); });

0 commit comments

Comments
 (0)