Skip to content

Commit

Permalink
Merge 2851519 into bac1280
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinoaldo committed Sep 2, 2019
2 parents bac1280 + 2851519 commit 00ed0bb
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,49 @@
name: GitHub CI

on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ${{matrix.os}}

strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node: [8, 10, 11, 12]
exclude:
- os: ubuntu-latest
node: 8

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{matrix.node}}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: npm install and test
run: |
npm install
npm test
env:
CI: true

coverage:
name: Coverage (Coveralls)
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: |
npm install
npm test
env:
CI: true
- name: Coveralls
if: success()
uses: coverallsapp/github-action@master
with:
github-token: ${{secrets.GITHUB_TOKEN}}
74 changes: 74 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,74 @@
name: publish

on: release

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
path: build

publish-npm:
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:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
name: Publish GitHub Packages
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@daquinoaldo'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -11,6 +11,7 @@ It works with MacOS, Linux and Windows, on Chrome and Firefox, and requires you
[![Dependency Status](https://img.shields.io/david/daquinoaldo/https-localhost.svg)](https://david-dm.org/daquinoaldo/https-localhost)
[![Known Vulnerabilities](https://snyk.io/test/npm/https-localhost/badge.svg)](https://snyk.io/test/npm/https-localhost)
[![GitHub issues](https://img.shields.io/github/issues/daquinoaldo/https-localhost.svg)](https://github.com/daquinoaldo/https-localhost/issues)
[![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)


## Dependencies
Expand Down
2 changes: 1 addition & 1 deletion certs.js
Expand Up @@ -103,7 +103,7 @@ async function generate(appDataPath = CERT_PATH) {
// mkdir if not exists
/* istanbul ignore else: not relevant */
if (!fs.existsSync(appDataPath))
fs.mkdirSync(appDataPath)
fs.mkdirSync(appDataPath, { recursive: true })
// build the executable url and path
const url = "https://github.com/FiloSottile/mkcert/releases/download/" +
MKCERT_VERSION + "/"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"pretest": "eslint --ignore-path .gitignore .",
"test": "node node_modules/nyc/bin/nyc.js node_modules/mocha/bin/_mocha --exit",
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter=html",
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter=lcov",
"coveralls": "node node_modules/nyc/bin/nyc.js report --reporter=text-lcov | node_modules/coveralls/bin/coveralls.js",
"preuninstall": "node certs.js -u",
"build": "pkg --out-path build .",
Expand Down

0 comments on commit 00ed0bb

Please sign in to comment.