Skip to content

Commit 997f058

Browse files
committed
chore: GH Actions, Dependabot, auto-release, remove Travis
1 parent f7a0071 commit 997f058

File tree

4 files changed

+161
-18
lines changed

4 files changed

+161
-18
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'daily'
7+
commit-message:
8+
prefix: 'chore'
9+
include: 'scope'
10+
- package-ecosystem: 'npm'
11+
directory: '/'
12+
schedule:
13+
interval: 'daily'
14+
commit-message:
15+
prefix: 'chore'
16+
include: 'scope'
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Test & Maybe Release
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
fail-fast: false
7+
matrix:
8+
node: [14.x, 16.x, 18.x, lts/*, current]
9+
os: [macos-latest, ubuntu-latest, windows-latest]
10+
runs-on: ${{ matrix.os }}
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v3
14+
- name: Use Node.js ${{ matrix.node }}
15+
uses: actions/[email protected]
16+
with:
17+
node-version: ${{ matrix.node }}
18+
- name: Install Dependencies
19+
run: |
20+
npm install --no-progress
21+
- name: Run tests
22+
run: |
23+
npm config set script-shell bash
24+
npm run test:ci
25+
release:
26+
name: Release
27+
needs: test
28+
runs-on: ubuntu-latest
29+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
- name: Setup Node.js
36+
uses: actions/[email protected]
37+
with:
38+
node-version: 14
39+
- name: Install dependencies
40+
run: |
41+
npm install --no-progress --no-package-lock --no-save
42+
- name: Build
43+
run: |
44+
npm run build
45+
- name: Install plugins
46+
run: |
47+
npm install \
48+
@semantic-release/commit-analyzer \
49+
conventional-changelog-conventionalcommits \
50+
@semantic-release/release-notes-generator \
51+
@semantic-release/npm \
52+
@semantic-release/github \
53+
@semantic-release/git \
54+
@semantic-release/changelog \
55+
--no-progress --no-package-lock --no-save
56+
- name: Release
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
run: npx semantic-release
61+

.travis.yml

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

package.json

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "bl.js",
77
"scripts": {
88
"lint": "standard *.js test/*.js",
9-
"test": "npm run lint && node test/test.js | faucet"
9+
"test": "npm run lint && node test/test.js | faucet",
10+
"test:ci": "npm run lint && node test/test.js",
11+
"build": "true"
1012
},
1113
"repository": {
1214
"type": "git",
@@ -33,5 +35,86 @@
3335
"faucet": "~0.0.1",
3436
"standard": "^16.0.3",
3537
"tape": "^5.2.2"
38+
},
39+
"release": {
40+
"branches": [
41+
"master"
42+
],
43+
"plugins": [
44+
[
45+
"@semantic-release/commit-analyzer",
46+
{
47+
"preset": "conventionalcommits",
48+
"releaseRules": [
49+
{
50+
"breaking": true,
51+
"release": "major"
52+
},
53+
{
54+
"revert": true,
55+
"release": "patch"
56+
},
57+
{
58+
"type": "feat",
59+
"release": "minor"
60+
},
61+
{
62+
"type": "fix",
63+
"release": "patch"
64+
},
65+
{
66+
"type": "chore",
67+
"release": "patch"
68+
},
69+
{
70+
"type": "docs",
71+
"release": "patch"
72+
},
73+
{
74+
"type": "test",
75+
"release": "patch"
76+
},
77+
{
78+
"scope": "no-release",
79+
"release": false
80+
}
81+
]
82+
}
83+
],
84+
[
85+
"@semantic-release/release-notes-generator",
86+
{
87+
"preset": "conventionalcommits",
88+
"presetConfig": {
89+
"types": [
90+
{
91+
"type": "feat",
92+
"section": "Features"
93+
},
94+
{
95+
"type": "fix",
96+
"section": "Bug Fixes"
97+
},
98+
{
99+
"type": "chore",
100+
"section": "Trivial Changes"
101+
},
102+
{
103+
"type": "docs",
104+
"section": "Trivial Changes"
105+
},
106+
{
107+
"type": "test",
108+
"section": "Tests"
109+
}
110+
]
111+
}
112+
}
113+
],
114+
"@semantic-release/changelog",
115+
"@semantic-release/npm",
116+
"@semantic-release/github",
117+
"@semantic-release/git"
118+
]
36119
}
37120
}

0 commit comments

Comments
 (0)