diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..347069e --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,36 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 +# - run: npm ci +# - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ +# - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/lib/daemon.js b/lib/daemon.js index 0704dc5..e9ba416 100644 --- a/lib/daemon.js +++ b/lib/daemon.js @@ -34,8 +34,9 @@ function startDaemon(argv) { var socket = null; var master = null; var server = null; + - fs.writeFile(pidFile, process.pid, function(){ + fs.writeFile(pidFile, process.pid.toString(), function(){ createLogsAndIpcServer(function(err) { if (err) { processSend({event: 'Error', value: err.message}); diff --git a/package.json b/package.json index 93dc535..9ae289b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "naught", - "version": "1.6.0", + "name": "@nuso.io/naught", + "version": "1.6.1", "description": "zero downtime deployment for your node.js server", "keywords": [ "deploy", @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/andrewrk/naught" + "url": "https://github.com/nuso/naught" }, "author": "Andrew Kelley", "license": "MIT", @@ -35,7 +35,7 @@ "pend": "~1.2.0" }, "bugs": { - "url": "https://github.com/andrewrk/naught/issues" + "url": "https://github.com/nuso/naught/issues" }, "directories": { "test": "test"