diff --git a/.github/workflows/electron-linux.yml b/.github/workflows/electron-linux.yml new file mode 100644 index 000000000..d0a126010 --- /dev/null +++ b/.github/workflows/electron-linux.yml @@ -0,0 +1,41 @@ +name: Electron Rebuild CI - Linux (x32 & x64) + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + electron: + - 5 + - 6 + - 7 + - 8 + include: + # includes a new variable for each electron (essentially a switch statement) + - electron: 5 + nodeVersion: 70 + - electron: 6 + nodeVersion: 73 + - electron: 7 + nodeVersion: 75 + - electron: 8 + nodeVersion: 76 + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + os: ${{ matrix.os }} + - name: Install packages + run: npm install --unsafe-perm + - name: Run node-gyp rebuild - Electron v${{ matrix.electron }} (Node ${{ matrix.nodeVersion }}) + run: node ./node_modules/node-gyp/bin/node-gyp.js rebuild --target=${{ matrix.electron }}.0.0 --arch=x64 --dist-url=https://electronjs.org/headers + - uses: actions/upload-artifact@v1 + with: + name: linux-x64-${{ matrix.nodeVersion }}_binding.node + path: build/Release/binding.node \ No newline at end of file diff --git a/.github/workflows/electron-osx.yml b/.github/workflows/electron-osx.yml new file mode 100644 index 000000000..84d52f7c1 --- /dev/null +++ b/.github/workflows/electron-osx.yml @@ -0,0 +1,41 @@ +name: Electron Rebuild CI - OSX (x64) + +on: [push, pull_request] + +jobs: + build: + + runs-on: macos-latest + + strategy: + matrix: + electron: + - 5 + - 6 + - 7 + - 8 + include: + # includes a new variable for each electron (essentially a switch statement) + - electron: 5 + nodeVersion: 70 + - electron: 6 + nodeVersion: 73 + - electron: 7 + nodeVersion: 75 + - electron: 8 + nodeVersion: 76 + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + os: ${{ matrix.os }} + - name: Install packages + run: npm install --unsafe-perm + - name: Run node-gyp rebuild - Electron v${{ matrix.electron }} (Node ${{ matrix.nodeVersion }}) + run: node ./node_modules/node-gyp/bin/node-gyp.js rebuild --target=${{ matrix.electron }}.0.0 --arch=x64 --dist-url=https://electronjs.org/headers + - uses: actions/upload-artifact@v1 + with: + name: darwin-x64-${{ matrix.nodeVersion }}_binding.node + path: build/Release/binding.node \ No newline at end of file diff --git a/.github/workflows/electron-win.yml b/.github/workflows/electron-win.yml new file mode 100644 index 000000000..0f32c91ba --- /dev/null +++ b/.github/workflows/electron-win.yml @@ -0,0 +1,48 @@ +name: Electron Rebuild CI - Windows (x32 & x64) + +on: [push, pull_request] + +jobs: + build: + + runs-on: windows-latest + + strategy: + matrix: + electron: + - 5 + - 6 + - 7 + - 8 + include: + # includes a new variable for each electron (essentially a switch statement) + - electron: 5 + nodeVersion: 70 + - electron: 6 + nodeVersion: 73 + - electron: 7 + nodeVersion: 75 + - electron: 8 + nodeVersion: 76 + arch: + - ia32 + - x64 + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + os: ${{ matrix.os }} + - name: Install packages + run: npm install --unsafe-perm + - name: Run electron-rebuild - Electron v${{ matrix.electron }} (Node ${{ matrix.nodeVersion }}) + run: npx electron-rebuild -v=${{ matrix.electron }} --arch=${{ matrix.arch }} -w node-sass + - uses: actions/upload-artifact@v1 + with: + name: win32-${{ matrix.arch }}-${{ matrix.nodeVersion }}_binding.node + path: build/Release/binding.node + - uses: actions/upload-artifact@v1 + with: + name: win32-${{ matrix.arch }}-${{ matrix.nodeVersion }}_binding.pdb + path: build/Release/binding.pdb \ No newline at end of file diff --git a/lib/extensions.js b/lib/extensions.js index 1e344c40e..74326c1ec 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -77,7 +77,11 @@ function getHumanNodeVersion(abi) { case 59: return 'Node.js 9.x'; case 64: return 'Node.js 10.x'; case 67: return 'Node.js 11.x'; + case 70: return 'Electron 5.x'; case 72: return 'Node.js 12.x'; + case 73: return 'Electron 6.x'; + case 75: return 'Electron 7.x'; + case 76: return 'Electron 8.x'; case 79: return 'Node.js 13.x'; default: return false; }