Skip to content

Commit 842722d

Browse files
author
Benjamin E. Coe
authored
build: use actions for build (#56)
1 parent f69406c commit 842722d

File tree

4 files changed

+61
-12
lines changed

4 files changed

+61
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: ci
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node: [6, 8, 10, 14]
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
- run: node --version
19+
- run: npm install
20+
- run: npm test
21+
windows:
22+
runs-on: windows-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 14
28+
- run: npm install
29+
- run: npm test

.github/workflows/release-please.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: GoogleCloudPlatform/[email protected]
11+
id: release
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
release-type: node
15+
package-name: yargs-unparser
16+
# The logic below handles the npm publication:
17+
- uses: actions/checkout@v2
18+
# these if statements ensure that a publication only occurs when
19+
# a new release is created:
20+
if: ${{ steps.release.outputs.release_created }}
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: 12
24+
registry-url: 'https://external-dot-oss-automation.appspot.com'
25+
if: ${{ steps.release.outputs.release_created }}
26+
- run: npm ci
27+
if: ${{ steps.release.outputs.release_created }}
28+
- run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
31+
if: ${{ steps.release.outputs.release_created }}

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
"node": ">=6"
1515
},
1616
"homepage": "https://github.com/yargs/yargs-unparser",
17-
"repository": {
18-
"type": "git",
19-
"url": "[email protected]:yargs/yargs-unparser.git"
20-
},
17+
"repository": "yargs/yargs-unparser",
2118
"license": "MIT",
2219
"main": "index.js",
2320
"files": [],

0 commit comments

Comments
 (0)