Skip to content

Commit

Permalink
replace travis with github actions (#31)
Browse files Browse the repository at this point in the history
* replace travis with github actions

* auto-create labels action

Co-authored-by: Bart Veneman <[email protected]>
  • Loading branch information
bartveneman and bartveneman committed Mar 22, 2020
1 parent e3043f3 commit 0480857
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{ "name": "🐛 defect", "color": "b62020", "description": "Something isn't working as expected" },
{ "name": "🚨 breaking change", "color": "b62020", "description": "changes that require a major version bump" },
{ "name": "📚 dependencies", "color": "0854c4", "description": "pull requests that update a dependency file" },
{ "name": "👯‍♂️ duplicate", "color": "9eacb3", "description": "this issue or pull request already exists" },
{ "name": "✨ enhancement", "color": "29c87d", "description": "New feature or request" },
{ "name": "🚸 help wanted", "color": "0854c4", "description": "issue needs help" },
{ "name": "🗣 feedback wanted", "color": "0854c4", "description": "community feedback wanted" },
{ "name": "⚠️ tests", "color": "f10e69", "description": "issues regarding test suite" },
{ "name": "🛑 wontfix", "color": "f8f8f8", "description": "not in scope of this package or can be achieved otherwise" }
]
17 changes: 17 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Create Default Labels

on:
issues:
type: [ opened ]

jobs:
labels:
name: Create Default Labels

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: lannonbr/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: NPM Publish

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
env:
CI: true
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![NPM Version](https://img.shields.io/npm/v/extract-css-core.svg)](https://www.npmjs.com/package/extract-css-core)
[![Weekly downloads](https://img.shields.io/npm/dw/extract-css-core.svg)](https://www.npmjs.com/package/extract-css-core)
[![Build Status](https://travis-ci.org/bartveneman/extract-css-core.svg?branch=master)](https://travis-ci.org/bartveneman/extract-css-core)
![Node.js CI](https://github.com/bartveneman/extract-css-core/workflows/Node.js%20CI/badge.svg)
[![Known Vulnerabilities](https://snyk.io/test/github/bartveneman/extract-css-core/badge.svg)](https://snyk.io/test/github/bartveneman/extract-css-core)
![Dependencies Status](https://img.shields.io/david/bartveneman/extract-css-core.svg)
![Dependencies Status](https://img.shields.io/david/dev/bartveneman/extract-css-core.svg)
Expand Down

0 comments on commit 0480857

Please sign in to comment.