Skip to content

Commit c7cbf87

Browse files
authored
Merge pull request #1 from Automattic/automattic-yara-package
Publish this repository as @automattic/yara npm package
2 parents 937910e + cab626f commit c7cbf87

File tree

4 files changed

+63
-5
lines changed

4 files changed

+63
-5
lines changed

.github/workflows/npmpublish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This workflow will publish this package to npm on each release created.
2+
# NPM_TOKEN secret needs to be created via https://www.npmjs.com/settings/a8c/tokens/ (choose automation token) and stored in this repository.
3+
#
4+
# See https://docs.github.com/en/actions/guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
5+
6+
name: Publish to npm
7+
8+
on:
9+
release:
10+
types: [created]
11+
12+
jobs:
13+
publish-npm:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: 14
20+
registry-url: https://registry.npmjs.org/
21+
- run: npm publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Tests
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
node-version:
19+
- '14.x'
20+
- '16.x'
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get install libyara-dev
32+
npm install
33+
34+
# - name: Run tests
35+
# run: npm test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This module is installed using [node package manager (npm)][npm]:
2424
# during installation using node-gyp. A suitable build chain
2525
# must be configured before installation.
2626

27-
npm install yara
27+
npm install @automattic/yara
2828

2929
It is loaded using the `require()` function:
3030

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "yara",
3-
"version": "2.2.0",
4-
"description": "YARA support for Node.js",
2+
"name": "@automattic/yara",
3+
"version": "2.3.0",
4+
"description": "Automattic's fork of YARA support for Node.js",
55
"main": "index.js",
66
"directories": {
77
"example": "example"
@@ -22,7 +22,7 @@
2222
],
2323
"repository": {
2424
"type": "git",
25-
"url": "git://github.com/nospaceships/node-yara.git"
25+
"url": "git://github.com/Automattic/node-yara.git"
2626
},
2727
"keywords": [
2828
"libyara",

0 commit comments

Comments
 (0)