diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 80711c2..73552c4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,59 +1,60 @@ -name: publish +name: build and publish -on: release +on: + release: + types: [published] -jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - run: npm ci - - run: npm test +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test - build: - name: Build binaries - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - name: npm run build - run: | - npm install - npm run build - - name: upload linux binary - uses: actions/upload-artifact@master - with: - name: https-localhost-linux - path: build - - name: upload macos binary - uses: actions/upload-artifact@master - with: - name: https-localhost-macos - path: build - - name: upload windows binary - uses: actions/upload-artifact@master - with: - name: https-localhost-win.exe + build: + name: build binaries + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - name: npm run build + run: | + npm install + npm run build + - name: upload linux binary + uses: actions/upload-artifact@master + with: + name: https-localhost-linux + path: build + - name: upload macos binary + uses: actions/upload-artifact@master + with: + name: https-localhost-macos + path: build + - name: upload windows binary + uses: actions/upload-artifact@master + with: + name: https-localhost-win.exe path: build - npm-publish: - name: Publish NPM - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm publish - env: + npm-publish: + name: npm publish + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b6fd045..4e6ae35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "https-localhost", - "version": "4.4.2", + "version": "4.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2656,7 +2656,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { diff --git a/package.json b/package.json index 91119ba..3852a38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "https-localhost", - "version": "4.4.2", + "version": "4.5.0", "description": "HTTPS server running on localhost", "main": "index.js", "scripts": {