Skip to content

Commit 0f3be56

Browse files
committed
[skip ci] Update version script.
1 parent 856adab commit 0f3be56

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
version:
1212
name: Version
1313
runs-on: ubuntu-latest
14+
if: github.ref_name == 'main'
1415
steps:
1516
- name: Checkout
1617
uses: actions/checkout@v4
@@ -36,6 +37,7 @@ jobs:
3637
uses: peter-evans/create-pull-request@v6
3738
with:
3839
branch: "gh-action-version"
40+
base: main
3941
delete-branch: true
4042
title: "Update package versions"
4143
body: "Merging this PR will publish packages to npm at the new version."

scripts/version.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ pluginPackageJson.version = newVersion;
2626
standalonePackageJson.version = newVersion;
2727

2828
await Promise.all([
29-
fs.writeFile(pluginPackageJsonPath, JSON.stringify(pluginPackageJson, null, 2), "utf-8"),
30-
fs.writeFile(standalonePackageJsonPath, JSON.stringify(standalonePackageJson, null, 2), "utf-8"),
29+
fs.writeFile(pluginPackageJsonPath, JSON.stringify(pluginPackageJson, null, 2) + "\n", "utf-8"),
30+
fs.writeFile(
31+
standalonePackageJsonPath,
32+
JSON.stringify(standalonePackageJson, null, 2) + "\n",
33+
"utf-8"
34+
),
3135
]);
3236
await new Promise((resolve, reject) => {
3337
exec(

0 commit comments

Comments
 (0)