Skip to content

Commit

Permalink
Add CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed Nov 14, 2019
1 parent 9059af0 commit 0c93912
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
uses: actions/setup-node@v1
with:
version: 12.x
- name: Verify
run: |
npm ci
npm run preversion
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
21 changes: 21 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Verify

on:
push:
tags:
- '!*'
jobs:
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install
run: npm ci
- name: Lint
run: npm run lint
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<h1><img width="90" src="assets/wc-markdown-readme-icon.png"> WC-Markdown</h1>

[![npm](https://badgen.net/npm/v/@vanillawc/wc-markdown)](https://www.npmjs.com/package/@vanillawc/wc-markdown)
[![downloads](https://badgen.net/npm/dt/@vanillawc/wc-markdown)](https://www.npmjs.com/package/@vanillawc/wc-markdown)
[![GitHub Releases](https://img.shields.io/github/release/vanillawc/wc-markdown.svg)](https://github.com/vanillawc/wc-markdown/releases)
[![NPM](https://badgen.net/npm/v/@vanillawc/wc-markdown)](https://www.npmjs.com/package/@vanillawc/wc-markdown)
[![Downloads](https://badgen.net/npm/dt/@vanillawc/wc-markdown)](https://www.npmjs.com/package/@vanillawc/wc-markdown)
[![CircleCI](https://circleci.com/gh/vanillawc/wc-markdown.svg?style=shield)](https://circleci.com/gh/vanillawc/wc-markdown)
[![Known Vulnerabilities](https://snyk.io/test/npm/@vanillawc/wc-markdown/badge.svg)](https://snyk.io/test/npm/@vanillawc/wc-markdown)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/vanillawc/wc-markdown/master/LICENSE)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:assets": "cp -r ./node_modules/prism-es6/themes ./dist/themes && cp -r ./node_modules/prism-es6/components ./dist/components",
"clean": "npx rimraf ./dist",
"package": "npx rimraf package && npm pack | tail -n 1 | xargs tar -xf",
"preversion": "npm run lint",
"version": "npm run build && git add dist/* && git diff --quiet && git diff --staged --quiet || git commit -am 'Bump'",
"postversion": "git push --follow-tags"
},
Expand Down

0 comments on commit 0c93912

Please sign in to comment.