Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/npm-gulp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: NodeJS with Gulp

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-2019

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install -g vsce
npm install -g node-gyp
npm install -g gulp
npm install --no-optional
gulp build --electron="17.2.0" --tag="downloads"
12 changes: 6 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ function getNodeNameAndUploadAssets(libraryName, electron, arch, client, tagName
}

gulp.task('build', (done)=> {
if (!cliArgs.electron || !cliArgs.token || !cliArgs.tag) {
done('Missing electron version, token, tag parameters!');
if (!cliArgs.electron || !cliArgs.tag) {
done('Missing electron version, tag parameters!');
return ;
}
const client = github.client(cliArgs.token);
// const client = github.client(cliArgs.token);
const tagName = cliArgs.tag;
const electron = cliArgs.electron;

const archs = ["ia32", "x64"];
const archs = ["x64"];
const platform = require('os').platform();

const tasks = [];
Expand All @@ -150,7 +150,7 @@ gulp.task('build', (done)=> {
callback('[node-gyp] Compiling usb-detection native code failed.');
} else {
console.log(`[node-gyp] Build complete.Generate dll at ${detectionNodePath}`);
getNodeNameAndUploadAssets("detector", electron, arch, client, tagName, detectionNodePath, callback);
// getNodeNameAndUploadAssets("detector", electron, arch, client, tagName, detectionNodePath, callback);
}
});

Expand All @@ -163,7 +163,7 @@ gulp.task('build', (done)=> {
callback('[node-gyp] Compiling serialport native code failed.');
} else {
console.log(`[node-gyp] Build complete.Generate dll at ${serialportNodePath}`);
getNodeNameAndUploadAssets("serialport", electron, arch, client, tagName, serialportNodePath, callback);
// getNodeNameAndUploadAssets("serialport", electron, arch, client, tagName, serialportNodePath, callback);
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import SerialPort = require('serialport')
import detection = require('usb-detection')
export { SerialPort }
export { detection }
Loading