Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 29 GitHub actions #33

Merged
merged 4 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master, deploy ]

jobs:
Lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '15.x'
- name: Install dependencies
run: npm ci
- name: Lint source files
run: npm run lint

Test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '15.x'
- name: Install dependencies
run: npm ci
- name: Run tests and produce coverage
run: npm run test:coverage
- name: Coveralls report
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info

Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '15.x'
- name: Install dependencies
run: npm ci
- name: Build source files
run: npm run build
- uses: actions/upload-artifact@v2
if: ${{ success() && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
with:
path: |
dist/**
lib/**
es/**
types/**

Release:
runs-on: ubuntu-latest

needs: [Lint, Test, Build]

if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '15.x'
- name: Install dependencies
run: npm ci
- uses: actions/download-artifact@v2
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
32 changes: 0 additions & 32 deletions .github/workflows/release.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/test-build.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ It can create a simple countdown timer, a stopwatch style counter and a dynamic

Compatible with Browsers and Node.js.

[![build status](https://img.shields.io/travis/joesmith100/timrjs.svg?style=flat-square)](https://travis-ci.org/joesmith100/timrjs)
[![coverage status](https://img.shields.io/coveralls/joesmith100/timrjs/master.svg?style=flat-square)](https://coveralls.io/github/joesmith100/timrjs?branch=master)
[![build status](https://github.com/joe-castle/timrjs/workflows/Build/badge.svg)](https://github.com/joe-castle/timrjs/actions/workflows/node-build.yml)
[![coverage status](https://img.shields.io/coveralls/joe-castle/timrjs/master.svg?style=flat-square)](https://coveralls.io/github/joe-castle/timrjs?branch=master)
[![npm version](https://img.shields.io/npm/v/timrjs.svg?style=flat-square)](https://www.npmjs.com/package/timrjs)
[![npm downloads](https://img.shields.io/npm/dm/timrjs.svg?style=flat-square)](https://www.npmjs.com/package/timrjs)
[![npm license](https://img.shields.io/npm/l/timrjs.svg?style=flat-square)](https://www.npmjs.com/package/timrjs)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

<!-- ## Important
Version 1.0 has had some substantial changes made to it (some of which are breaking), if you've been using previous versions, go [here](https://github.com/joesmith100/timrjs/releases/tag/v1.0.0) to see whats changed. -->
Version 1.0 has had some substantial changes made to it (some of which are breaking), if you've been using previous versions, go [here](https://github.com/joe-castle/timrjs/releases/tag/v1.0.0) to see whats changed. -->

## Examples
Here are a few different ways you could use Timr.
Expand Down Expand Up @@ -435,7 +435,7 @@ import {
```

### Bugs
If you find any and fancy helping me out, [create an issue](https://github.com/joesmith100/timrjs/issues), or [submit a pull request](https://github.com/joesmith100/timrjs/pulls).
If you find any and fancy helping me out, [create an issue](https://github.com/joe-castle/timrjs/issues), or [submit a pull request](https://github.com/joe-castle/timrjs/pulls).

### License
MIT