Skip to content

Commit

Permalink
Switch to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh authored Nov 4, 2021
1 parent 67e8036 commit 590d996
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 44 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on: push

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: yarn install --frozen-lockfile
- run: yarn lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: yarn install --frozen-lockfile
- run: yarn typecheck

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: yarn install --frozen-lockfile
- run: yarn build
21 changes: 21 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish to NPM

on:
push:
tags:
- 'v*.*.*'

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_HEARTHSIM_TOKEN}}
42 changes: 0 additions & 42 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
@@ -1,5 +1,5 @@
# HearthstoneJSON Client
[![Travis](https://img.shields.io/travis/HearthSim/npm-hearthstonejson-client/master.svg)](https://travis-ci.org/HearthSim/npm-hearthstonejson-client)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/HearthSim/npm-hearthstonejson-client/CI/master)](https://github.com/HearthSim/npm-hearthstonejson-client/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/hearthstonejson-client.svg)](http://npmjs.com/package/hearthstonejson-client)

Fetches data from [HearthstoneJSON](https://hearthstonejson.com/). Builds are cached in LocalStorage if available.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dev": "rollup -cw",
"format": "prettier --write \"{src/**/*.ts,*.js,*.ts}\"",
"lint": "prettier --list-different \"{src/**/*.ts,*.js,*.ts}\"",
"type-check": "tsc"
"typecheck": "tsc"
},
"devDependencies": {
"node-fetch": "^2.0.0",
Expand Down

0 comments on commit 590d996

Please sign in to comment.