diff --git a/.woodpecker.yml b/.woodpecker.yml index 7b79602..dd6f1fa 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -6,11 +6,16 @@ pipeline: image: node:18-alpine commands: - apk add git - - npm install + - npm ci - mkdir build - npm run prepublish - npm run bundleRelease - - npm run build-linux-arm64 + buildBin: + image: node:18-alpine + commands: + - npm run build-all + when: + event: tag publish: image: node:18-alpine commands: diff --git a/package-lock.json b/package-lock.json index 49a17ac..9f0287d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,9 @@ "prompts": "^2.4.2", "ws": "^8.12.1" }, + "bin": { + "outbag-server": "dist/main.js" + }, "devDependencies": { "@types/auth-header": "^1.0.2", "@types/cors": "^2.8.13", @@ -30,6 +33,9 @@ "esbuild": "^0.17.10", "pkg": "^5.8.0", "typescript": "^4.9.4" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@babel/generator": { diff --git a/package.json b/package.json index fa5a112..58ff144 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dist/*" ], "engines": { - "node": ">= 16" + "node": ">= 18" }, "scripts": { "prepublish": "tsc", @@ -26,7 +26,8 @@ "build-win-arm64": "mkdir build/bin & pkg -t node18-win-arm64 -o build/bin/outbag-win-arm64 build/bundle/main.js", "build-macos-x64": "mkdir build/bin & pkg -t node18-macos-x64 -o build/bin/outbag-macos-x64 build/bundle/main.js", "build-macos-arm64": "mkdir build/bin & pkg -t node18-macos-arm64 -o build/bin/outbag-macos-arm64 build/bundle/main.js", - "build-all": "mkdir build/bin & pkg -t node18-linux-x64,node18-linux-arm64,node18-win-x64,node18-win-arm64,node18-macos-x64 -o build/bin/outbag build/bundle/main.js" + "build-all": "mkdir build/bin & pkg -t node18-linux-x64,node18-linux-arm64,node18-win-x64,node18-win-arm64,node18-macos-x64 -o build/bin/outbag build/bundle/main.js", + "build-self": "mkdir build/bin & pkg -t node18 -o build/bin/outbag build/bundle/main.js" }, "repository": { "type": "git",