Skip to content

Commit 14a9a38

Browse files
feat: update CI to use GitHub actions (#172)
1 parent 91b7b4c commit 14a9a38

File tree

6 files changed

+104
-14
lines changed

6 files changed

+104
-14
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Canary
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [14.x]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: yarn install
23+
- run: yarn build
24+
- run: yarn test
25+
26+
publish-canary:
27+
runs-on: ubuntu-latest
28+
needs: test
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions/setup-node@v1
32+
with:
33+
node-version: 14.x
34+
registry-url: 'https://registry.npmjs.org'
35+
- run: yarn install
36+
- run: yarn build
37+
- run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/rollingversions.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
repository_dispatch:
4+
types: [rollingversions_publish_approved]
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [14.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: yarn install
21+
- run: yarn build
22+
- run: yarn test
23+
24+
publish:
25+
runs-on: ubuntu-latest
26+
needs: test
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-node@v1
30+
with:
31+
node-version: 14.x
32+
registry-url: 'https://registry.npmjs.org'
33+
- run: yarn install
34+
- run: yarn build
35+
- run: npx rollingversions publish
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

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

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ components
22
node_modules
33
test
44
.gitignore
5-
.travis.yml
5+
.github
66
component.json
77
coverage

.travis.yml

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Bare bones Promises/A+ implementation",
55
"main": "index.js",
66
"scripts": {
7-
"prepublish": "node build",
7+
"build": "node build",
88
"pretest": "node build",
99
"pretest-resolve": "node build",
1010
"pretest-extensions": "node build",

0 commit comments

Comments
 (0)