CI: download previous build using GitHub Actions

This commit is contained in:
SukkaW
2025-01-18 22:57:41 +08:00
parent 5e0780af35
commit a812c40384
6 changed files with 42 additions and 69 deletions

View File

@@ -1,6 +1,5 @@
import path from 'node:path';
import fs from 'node:fs';
import { isCI } from 'ci-info';
import process from 'node:process';
export const ROOT_DIR = path.resolve(__dirname, '../..');
@@ -8,9 +7,7 @@ export const CACHE_DIR = path.resolve(ROOT_DIR, '.cache');
export const SOURCE_DIR = path.join(ROOT_DIR, 'Source');
export const PUBLIC_DIR = isCI
? fs.mkdtempSync('/dev/shm/sukkaw-surge-public-')
: path.resolve(ROOT_DIR, 'public');
export const PUBLIC_DIR = process.env.PUBLIC_DIR || path.resolve(ROOT_DIR, 'public');
export const OUTPUT_SURGE_DIR = path.join(PUBLIC_DIR, 'List');
export const OUTPUT_CLASH_DIR = path.resolve(PUBLIC_DIR, 'Clash');