Skip to content

Commit

Permalink
Merge pull request #18 from zalando-incubator/as-publish-workflows
Browse files Browse the repository at this point in the history
Add github build and publish workflows
  • Loading branch information
ruiaraujo authored Mar 18, 2021
2 parents d92b299 + 7c57e88 commit 71581a5
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10, 12, 14, 15]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: npm install

- name: Link check
run: npm run lint

- name: Tests and benchmark
run: npm run test && npm run benchmark
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish
on:
release:
types: [created]
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
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Banknote
[![NPM](https://nodei.co/npm/banknote.png)](https://npmjs.org/package/banknote)

Banknote is a small, easy-to-use JavaScript library that provides a simple way to format monetary amounts in multiple locales and currencies. It’s mainly targeted at Node.js, but also works in the browser (if needed) with module bundlers like [Webpack](https://webpack.github.io/) and [Browserify](http://browserify.org/).


![build](https://github.com/zalando-incubator/banknote/actions/workflows/build.yml/badge.svg)
[![downloads](https://img.shields.io/npm/dt/banknote.svg)](https://npmjs.org/package/banknote?cacheSeconds=3600)
[![version](https://img.shields.io/npm/v/banknote.svg)](https://npmjs.org/package/banknote?cacheSeconds=3600)

## Features

Banknote addresses a common problem faced by anyone (for example, an e-commerce company) who has to update and format prices on the frontend. It is different from similar projects in that it follows Unicode CLDR formatting standards, not an ad hoc data solution. It also:
Expand Down

0 comments on commit 71581a5

Please sign in to comment.