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

Migrate to github actions #50

Merged
merged 2 commits into from
Nov 5, 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
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