Skip to content

Commit d1dfc66

Browse files
authored
chore: fix release and pre-release ci (#832)
1 parent 8d134bc commit d1dfc66

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.github/scripts/before-beta-release.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import path from 'node:path';
2-
import { readFile, writeFile } from 'node:fs/promises';
31
import { execSync } from 'node:child_process';
2+
import { readFile, writeFile } from 'node:fs/promises';
3+
import path from 'node:path';
44

55
const PKG_JSON_PATH = path.join(import.meta.dirname, '..', '..', 'package.json');
66

@@ -13,10 +13,14 @@ const nextVersion = getNextVersion(VERSION);
1313
console.log(`before-deploy: Setting version to ${nextVersion}`);
1414
pkgJson.version = nextVersion;
1515

16-
await writeFile(PKG_JSON_PATH, JSON.stringify(pkgJson, null, 4) + '\n');
16+
await writeFile(PKG_JSON_PATH, `${JSON.stringify(pkgJson, null, 4)}\n`);
1717

1818
function getNextVersion(version: string) {
19-
const versionString = execSync(`npm show ${PACKAGE_NAME} versions --json`, { encoding: 'utf8' });
19+
const versionString = execSync(`npm show ${PACKAGE_NAME} versions --json`, {
20+
encoding: 'utf8',
21+
stdio: ['ignore', 'pipe', 'ignore'],
22+
});
23+
2024
const versions = JSON.parse(versionString) as string[];
2125

2226
if (versions.some((v) => v === VERSION)) {

.github/workflows/pre_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
ref: ${{ github.ref }}
3939
repo-token: ${{ secrets.GITHUB_TOKEN }}
40-
check-regexp: (Build & Test .*|Test Python template support|Lint|Docs build)
40+
check-regexp: (Build|Lint.*|(Local|API) Tests.*|Python Support.*|Docs build)
4141
wait-interval: 5
4242

4343
update_changelog:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
with:
6767
ref: ${{ github.ref }}
6868
repo-token: ${{ secrets.GITHUB_TOKEN }}
69-
check-regexp: (Build & Test .*|Test Python template support|Lint|Docs build)
69+
check-regexp: (Build|(Local|API) Tests.*|Python Support.*|Docs build)
7070
wait-interval: 5
7171

7272
update_changelog:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"packageManager": {
170170
"name": "yarn",
171171
"version": ">= 4",
172-
"onFail": "download"
172+
"onFail": "warn"
173173
}
174174
},
175175
"lint-staged": {

tsconfig.eslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
".yarn/plugins/postinstallDev.cjs",
1313
"features/**/*.ts",
1414
"features/**/*.js",
15-
"scripts",
15+
".github/scripts",
1616
"eslint.config.mjs"
1717
]
1818
}

0 commit comments

Comments
 (0)