Skip to content

Commit a7cc802

Browse files
committed
Merge branch 'master' of github.com:daquinoaldo/https-localhost
2 parents d8a1e42 + 6f35e47 commit a7cc802

File tree

6 files changed

+127
-3
lines changed

6 files changed

+127
-3
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: GitHub CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: Test
8+
runs-on: ${{matrix.os}}
9+
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macOS-latest, windows-latest]
13+
node: [8, 10, 11, 12]
14+
exclude:
15+
- os: ubuntu-latest
16+
node: 8
17+
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Use Node.js ${{matrix.node}}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node }}
24+
- name: npm install and test
25+
run: |
26+
npm install
27+
npm test
28+
env:
29+
CI: true
30+
31+
coverage:
32+
name: Coverage (Coveralls)
33+
needs: test
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v1
37+
- uses: actions/setup-node@v1
38+
with:
39+
node-version: 12
40+
- run: |
41+
npm install
42+
npm test
43+
env:
44+
CI: true
45+
- name: Coveralls
46+
if: success()
47+
uses: coverallsapp/github-action@master
48+
with:
49+
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/publish.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: publish
2+
3+
on: release
4+
5+
jobs:
6+
test:
7+
name: Test
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 12
14+
- run: npm ci
15+
- run: npm test
16+
17+
build:
18+
name: Build binaries
19+
needs: test
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v1
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 12
26+
registry-url: https://registry.npmjs.org/
27+
- name: npm run build
28+
run: |
29+
npm install
30+
npm run build
31+
- name: upload linux binary
32+
uses: actions/upload-artifact@master
33+
with:
34+
name: https-localhost-linux
35+
path: build
36+
- name: upload macos binary
37+
uses: actions/upload-artifact@master
38+
with:
39+
name: https-localhost-macos
40+
path: build
41+
- name: upload windows binary
42+
uses: actions/upload-artifact@master
43+
with:
44+
name: https-localhost-win.exe
45+
path: build
46+
47+
publish-npm:
48+
name: Publish NPM
49+
needs: test
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v1
53+
- uses: actions/setup-node@v1
54+
with:
55+
node-version: 12
56+
registry-url: https://registry.npmjs.org/
57+
- run: npm publish
58+
env:
59+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
60+
61+
publish-gpr:
62+
name: Publish GitHub Packages
63+
needs: test
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v1
67+
- uses: actions/setup-node@v1
68+
with:
69+
node-version: 12
70+
registry-url: https://npm.pkg.github.com/
71+
scope: '@daquinoaldo'
72+
- run: npm publish
73+
env:
74+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ It works with MacOS, Linux and Windows, on Chrome and Firefox, and requires you
1111
[![Dependency Status](https://img.shields.io/david/daquinoaldo/https-localhost.svg)](https://david-dm.org/daquinoaldo/https-localhost)
1212
[![Known Vulnerabilities](https://snyk.io/test/npm/https-localhost/badge.svg)](https://snyk.io/test/npm/https-localhost)
1313
[![GitHub issues](https://img.shields.io/github/issues/daquinoaldo/https-localhost.svg)](https://github.com/daquinoaldo/https-localhost/issues)
14+
[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fdaquinoaldo%2Fhttps-localhost%2Fbadge)](https://actions-badge.atrox.dev/daquinoaldo/https-localhost/goto)
1415

1516

1617
## Dependencies

certs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async function generate(appDataPath = CERT_PATH) {
103103
// mkdir if not exists
104104
/* istanbul ignore else: not relevant */
105105
if (!fs.existsSync(appDataPath))
106-
fs.mkdirSync(appDataPath)
106+
fs.mkdirSync(appDataPath, { recursive: true })
107107
// build the executable url and path
108108
const url = "https://github.com/FiloSottile/mkcert/releases/download/" +
109109
MKCERT_VERSION + "/"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"pretest": "eslint --ignore-path .gitignore .",
88
"test": "node node_modules/nyc/bin/nyc.js node_modules/mocha/bin/_mocha --exit",
9-
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter=html",
9+
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter=lcov",
1010
"coveralls": "node node_modules/nyc/bin/nyc.js report --reporter=text-lcov | node_modules/coveralls/bin/coveralls.js",
1111
"preuninstall": "node certs.js -u",
1212
"build": "pkg --out-path build .",

0 commit comments

Comments
 (0)