Skip to content

Commit

Permalink
chore: Switch to GitHub Actions (#79)
Browse files Browse the repository at this point in the history
* chore: Switch to GitHub Actions

* Update validate.yml
  • Loading branch information
MichaelDeBoey committed Nov 5, 2020
1 parent fdd7361 commit 943cd0b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 28 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/validate.yml
@@ -0,0 +1,69 @@
name: validate
on: [push, pull_request]
jobs:
main:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [10.12, 10, 12.0, 12, 14, 15]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: ▶️ Run validate script
run: npm run validate

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v1

release:
needs: main
runs-on: ubuntu-latest
if:
${{ github.repository == 'kentcdodds/eslint-config-kentcdodds' &&
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v1
with:
node-version: 14

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: 🏗 Run build script
run: npm run build

- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -193,8 +193,8 @@ MIT
<!-- prettier-ignore-start -->
[npm]: https://www.npmjs.com
[node]: https://nodejs.org
[build-badge]: https://img.shields.io/travis/com/kentcdodds/eslint-config-kentcdodds.svg?style=flat-square
[build]: https://travis-ci.com/kentcdodds/eslint-config-kentcdodds
[build-badge]: https://img.shields.io/github/workflow/status/kentcdodds/eslint-config-kentcdodds/validate/main?logo=github&style=flat-square
[build]: https://github.com/kentcdodds/eslint-config-kentcdodds/actions?query=workflow%3Avalidate
[version-badge]: https://img.shields.io/npm/v/eslint-config-kentcdodds.svg?style=flat-square
[package]: https://www.npmjs.com/package/eslint-config-kentcdodds
[downloads-badge]: https://img.shields.io/npm/dm/eslint-config-kentcdodds.svg?style=flat-square
Expand Down

0 comments on commit 943cd0b

Please sign in to comment.