Skip to content

Commit eeca849

Browse files
janbucharB4nan
andauthored
ci: Fix pre-release (#753)
Co-authored-by: Martin Adámek <[email protected]>
1 parent af2b0e9 commit eeca849

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { execSync } from 'node:child_process';
1+
import path from 'node:path';
22
import { readFile, writeFile } from 'node:fs/promises';
3+
import { execSync } from 'node:child_process';
34

4-
const PKG_JSON_PATH = new URL('../../package.json', import.meta.url);
5+
const PKG_JSON_PATH = path.join(import.meta.dirname, '..', '..', 'package.json');
56

6-
const pkgJson = JSON.parse(await readFile(PKG_JSON_PATH, 'utf8'));
7+
const pkgJson = JSON.parse(await readFile(PKG_JSON_PATH, { encoding: 'utf8' }));
78

89
const PACKAGE_NAME = pkgJson.name;
910
const VERSION = pkgJson.version;

.github/workflows/pre_release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
release_metadata:
17-
if: "!startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'ci') && startsWith(github.repository, 'apify/')"
17+
if: "!startsWith(github.event.head_commit.message, 'docs') && startsWith(github.repository, 'apify/')"
1818
name: Prepare release metadata
1919
runs-on: ubuntu-latest
2020
outputs:
@@ -68,8 +68,8 @@ jobs:
6868
with:
6969
cache: yarn
7070

71-
# - name: Update package version in package.json
72-
# run: yarn version ${{ needs.release_metadata.outputs.version_number }}
71+
- name: Update package version in package.json
72+
run: yarn version ${{ needs.release_metadata.outputs.version_number }}
7373

7474
- name: Update CHANGELOG.md
7575
uses: DamianReeves/write-file-action@master

0 commit comments

Comments
 (0)