From bc50916786aba58cdb449d636fd2aea2bc69bdb5 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Thu, 21 Sep 2023 13:27:15 +0200 Subject: [PATCH] Use script and env --- .../workflows/discover-and-prepare-upstream-native-modules.yml | 2 +- .github/workflows/linux-build-prebuilds.yml | 2 +- .github/workflows/macos-intel-build-prebuilds.yml | 2 +- .github/workflows/windows-intel-build-prebuilds.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/discover-and-prepare-upstream-native-modules.yml b/.github/workflows/discover-and-prepare-upstream-native-modules.yml index 0c7a7c8..f160ed1 100644 --- a/.github/workflows/discover-and-prepare-upstream-native-modules.yml +++ b/.github/workflows/discover-and-prepare-upstream-native-modules.yml @@ -35,7 +35,7 @@ jobs: run: sudo apt-get install -y libkrb5-dev - run: npm install --omit=optional - name: Set Electron Major version in env - run: echo "ELECTRON_MAJOR_VERSION=$(node --eval='const semver = require(\"semver\"); const electron = require(\"electron/package.json\"); console.log(semver.major(electron.version))')" >> $GITHUB_ENV + run: echo "ELECTRON_MAJOR_VERSION=$(node get-electron-major-version.js)" >> $GITHUB_ENV - run: npm run prepare - name: Upload list of modules to build uses: actions/upload-artifact@v3 diff --git a/.github/workflows/linux-build-prebuilds.yml b/.github/workflows/linux-build-prebuilds.yml index fbcaab8..25eb857 100644 --- a/.github/workflows/linux-build-prebuilds.yml +++ b/.github/workflows/linux-build-prebuilds.yml @@ -19,7 +19,7 @@ jobs: - name: Install toolkit run: npm ci - name: Set Electron Major version in env - run: echo "ELECTRON_MAJOR_VERSION=$(node --eval='const semver = require(\"semver\"); const electron = require(\"electron/package.json\"); console.log(semver.major(electron.version))')" >> $GITHUB_ENV + run: echo "ELECTRON_MAJOR_VERSION=$(node get-electron-major-version.js)" >> $GITHUB_ENV - name: Download artifact id: download-artifact uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/macos-intel-build-prebuilds.yml b/.github/workflows/macos-intel-build-prebuilds.yml index 06361f4..4939f4e 100644 --- a/.github/workflows/macos-intel-build-prebuilds.yml +++ b/.github/workflows/macos-intel-build-prebuilds.yml @@ -21,7 +21,7 @@ jobs: - name: Install toolkit run: npm ci - name: Set Electron Major version in env - run: echo "ELECTRON_MAJOR_VERSION=$(node --eval='const semver = require(\"semver\"); const electron = require(\"electron/package.json\"); console.log(semver.major(electron.version))')" >> $GITHUB_ENV + run: echo "ELECTRON_MAJOR_VERSION=$(node get-electron-major-version.js)" >> $GITHUB_ENV - name: Download artifact id: download-artifact uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/windows-intel-build-prebuilds.yml b/.github/workflows/windows-intel-build-prebuilds.yml index 26a287f..8156227 100644 --- a/.github/workflows/windows-intel-build-prebuilds.yml +++ b/.github/workflows/windows-intel-build-prebuilds.yml @@ -25,7 +25,7 @@ jobs: - name: Install tookit dependencies run: npm ci - name: Set Electron Major version in env - run: echo "ELECTRON_MAJOR_VERSION=$(node --eval='const semver = require(\"semver\"); const electron = require(\"electron/package.json\"); console.log(semver.major(electron.version))')" >> $GITHUB_ENV + run: echo "ELECTRON_MAJOR_VERSION=$(node get-electron-major-version.js)" >> $GITHUB_ENV - name: Download artifact id: download-artifact uses: dawidd6/action-download-artifact@v2