Skip to content

Commit 3733e1f

Browse files
Add build workflow
1 parent caca987 commit 3733e1f

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
tags:
4+
- "v*.*.*"
5+
6+
name: Build and Release
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Install NodeJS
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 16.x
20+
registry-url: https://registry.npmjs.org
21+
22+
- name: Verify versions
23+
run: node --version && npm --version && node -p process.versions.v8
24+
25+
- name: Release package
26+
run: npm publish
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# js-safe-expression
22

3-
[![NPM](https://img.shields.io/npm/v/safe-expression.svg)](https://www.npmjs.com/package/safe-expression) [![Downloads](https://img.shields.io/npm/dt/safe-expression.svg)](https://www.npmjs.com/package/safe-expression)
3+
[![Test and Build](https://github.com/crisp-oss/js-safe-expression/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/crisp-oss/js-safe-expression/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/crisp-oss/js-safe-expression/workflows/Build%20and%20Release/badge.svg)](https://github.com/crisp-oss/js-safe-expression/actions?query=workflow%3A%22Build+and+Release%22) [![NPM](https://img.shields.io/npm/v/safe-expression.svg)](https://www.npmjs.com/package/safe-expression) [![Downloads](https://img.shields.io/npm/dt/safe-expression.svg)](https://www.npmjs.com/package/safe-expression)
44

55
A lightweight, CSP-safe and fast javascript expression parser/executor. The main usage for this project is to execute javascript code without using eval or Function. It is built on the top of the AngularJS 1 internal lexer/parser. It compiles & executes javascript strings using a provided scope such as `"1+1"` or `"context.call_a_function()"`, `"value = 'foo"`, `"value === 'foo'"`
66

0 commit comments

Comments
 (0)