Skip to content

Commit c09696f

Browse files
chore: Switch to GitHub Actions (#165)
1 parent c09e744 commit c09696f

File tree

4 files changed

+71
-41
lines changed

4 files changed

+71
-41
lines changed

.github/workflows/validate.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: validate
2+
on: [push, pull_request]
3+
jobs:
4+
main:
5+
strategy:
6+
matrix:
7+
os: [ubuntu-latest, windows-latest]
8+
node: [10.13, 12, 14, 15]
9+
runs-on: ${{ matrix.os }}
10+
steps:
11+
- name: ⬇️ Checkout repo
12+
uses: actions/checkout@v2
13+
14+
- name: ⎔ Setup node
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
19+
- name: 📥 Download deps
20+
uses: bahmutov/npm-install@v1
21+
with:
22+
useLockFile: false
23+
24+
- name: ▶️ Run validate script
25+
run: npm run validate
26+
27+
- name: ⬆️ Upload coverage report
28+
uses: codecov/codecov-action@v1
29+
30+
release:
31+
needs: main
32+
runs-on: ubuntu-latest
33+
if:
34+
${{ github.repository == 'kentcdodds/kcd-scripts' &&
35+
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
36+
github.ref) && github.event_name == 'push' }}
37+
steps:
38+
- name: ⬇️ Checkout repo
39+
uses: actions/checkout@v2
40+
41+
- name: ⎔ Setup node
42+
uses: actions/setup-node@v1
43+
with:
44+
node-version: 14
45+
46+
- name: 📥 Download deps
47+
uses: bahmutov/npm-install@v1
48+
with:
49+
useLockFile: false
50+
51+
- name: 🏗 Run build script
52+
run: npm run build
53+
54+
- name: 🚀 Release
55+
uses: cycjimmy/semantic-release-action@v2
56+
with:
57+
semantic_version: 17
58+
branches: |
59+
[
60+
'+([0-9])?(.{+([0-9]),x}).x',
61+
'main',
62+
'next',
63+
'next-major',
64+
{name: 'beta', prerelease: true},
65+
{name: 'alpha', prerelease: true}
66+
]
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ MIT
218218
<!-- prettier-ignore-start -->
219219
[npm]: https://www.npmjs.com
220220
[node]: https://nodejs.org
221-
[build-badge]: https://img.shields.io/travis/com/kentcdodds/kcd-scripts.svg?style=flat-square
222-
[build]: https://travis-ci.com/kentcdodds/kcd-scripts
221+
[build-badge]: https://img.shields.io/github/workflow/status/kentcdodds/kcd-scripts/validate/main?logo=github&style=flat-square
222+
[build]: https://github.com/kentcdodds/kcd-scripts/actions?query=workflow%3Avalidate
223223
[coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/kcd-scripts.svg?style=flat-square
224224
[coverage]: https://codecov.io/github/kentcdodds/kcd-scripts
225225
[version-badge]: https://img.shields.io/npm/v/kcd-scripts.svg?style=flat-square

appveyor.yml

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

0 commit comments

Comments
 (0)