Skip to content

Commit

Permalink
Merge pull request #50 from Davidhanson90/main
Browse files Browse the repository at this point in the history
Migrate to github actions
  • Loading branch information
Davidhanson90 authored Nov 5, 2021
2 parents 9362862 + 1a0da38 commit 013c0c2
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 48 deletions.
26 changes: 26 additions & 0 deletions .github/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

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

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.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 run build-release
25 changes: 25 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: NPM Publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ spec/
reports/
dist/spec/
.vscode/
.github/**/*

karma.conf.js
karma.base.conf.js
Expand Down
148 changes: 104 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.3.10",
"version": "0.3.11",
"description": "A small & lightweight dependency injection container for use in multiple contexts like Angular, React & node.",
"name": "@morgan-stanley/needle",
"license": "Apache-2.0",
Expand All @@ -21,7 +21,7 @@
"build": "tsc -p main/tsconfig.json",
"postbuild": "npm run copy",
"copy": "copyfiles main/**/*.html main/**/*.css main/**/*.jpg dist",
"prebuild-release": "npm ci && npm run clean && npm run verify-release",
"prebuild-release": "npm run clean && npm run verify-release",
"verify-release": "concurrently --kill-others-on-fail npm:lint npm:test npm:build",
"build-release": "npm run copy-dist && typedoc",
"watch-build": "tsc --watch",
Expand All @@ -44,7 +44,7 @@
"ajv": "^6.10.2",
"chromedriver": "^2.44.1",
"circular-dependency-plugin": "^5.2.0",
"codecov": "^3.7.0",
"codecov": "^3.8.3",
"concurrently": "^4.1.0",
"copyfiles": "^1.2.0",
"eslint": "^7.20.0",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# @morgan-stanley/needle
![npm](https://img.shields.io/npm/v/@morgan-stanley/needle)
[![Build Status](https://travis-ci.com/MorganStanley/needle.svg?branch=main)](https://travis-ci.com/MorganStanley/needle?branch=main)
[![Build Status](https://github.com/morganstanley/needle/actions/workflows/build.yml/badge.svg)](https://github.com/Roaders/needle/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/MorganStanley/needle/branch/master/graph/badge.svg)](https://codecov.io/gh/MorganStanley/needle)
[![Known Vulnerabilities](https://snyk.io/test/github/MorganStanley/needle/badge.svg)](https://snyk.io/test/github/MorganStanley/needle})
![NPM](https://img.shields.io/npm/l/@morgan-stanley/needle)
Expand Down

0 comments on commit 013c0c2

Please sign in to comment.