Skip to content

Commit

Permalink
Merge pull request #9 from andstor/feat/automation
Browse files Browse the repository at this point in the history
Feat/automation
  • Loading branch information
andstor committed Mar 7, 2020
2 parents da9e26d + 81ad455 commit 8261f80
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on: ["push", "pull_request"]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v1

- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Test
run: |
npm ci
npm run build --if-present
npm run coverage || npm test
- name: File existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ./coverage/lcov.info

- name: Coveralls
if: steps.check_files.outputs.files_exists == 'true'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

31 changes: 31 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: GitHub Pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build Docs
uses: andstor/jsdoc-action@v1
with:
source_dir: ./src
recurse: true
output_dir: ./out
template_name: minami
front_page: README.md

- name: Include Examples
run: mv ./examples ./out/

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./out
37 changes: 37 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish package

on:
release:
types:
- published

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Test
uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm run build --if-present
- run: npm test

publish-npm:
name: Publish to 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 install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
src="media/voxel.png" alt="Normalize Logo"
width="100" height="auto" align="right"></a>

[![Build Status](https://travis-ci.org/andstor/voxelizer.svg?branch=master)](https://travis-ci.org/andstor/voxelizer)
[![Coverage Status](https://coveralls.io/repos/github/andstor/voxelizer/badge.svg?branch=master)](https://coveralls.io/github/andstor/voxelizer?branch=master)
[![npm version](http://img.shields.io/npm/v/voxelizer.svg?style=flat)](https://npmjs.org/package/voxelizer "View this project on npm")
![Build](https://github.com/andstor/voxelizer/workflows/Build/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/andstor/voxelizer/badge.svg?branch=master)](https://coveralls.io/github/andstor/voxelizer?branch=master)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/andstor/voxelizer.svg?)](https://lgtm.com/projects/g/andstor/voxelizer/context:javascript)

Voxelizer is a JavaScript library for conducting voxelization of 3D models.
Expand Down

0 comments on commit 8261f80

Please sign in to comment.