-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f883585
Showing
9 changed files
with
1,344 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
env: | ||
node: true | ||
es2021: true | ||
extends: 'eslint:recommended' | ||
parserOptions: | ||
ecmaVersion: 12 | ||
sourceType: module | ||
rules: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build | ||
on: | ||
push: | ||
|
||
jobs: | ||
check_eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install modules | ||
run: | | ||
sudo npm install -g eslint@8 | ||
- run: eslint index.js --ext .js,.jsx,.ts,.tsx | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 17 | ||
- run: | | ||
npm install | ||
- run: | | ||
npm run-script test | ||
npm: | ||
name: npm-publish | ||
if: "github.event_name == 'push'" | ||
runs-on: ubuntu-latest | ||
needs: [check_eslint,test] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install modules | ||
run: | | ||
npm install | ||
- name: Test | ||
run: npm test | ||
- run: | | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,' | sed -e 's/^v//') | ||
jq '.version="'"$VERSION"'"' package.json > /tmp/a | ||
mv /tmp/a package.json | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
- run: | | ||
# npm login --scope=@halleyassist --registry=https://registry.npmjs.org/ | ||
npm whoami | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
- run: | | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: https://npm.pkg.github.com/ | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
- run: | | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
if: "startsWith(github.ref, 'refs/tags/v')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# rule-parser | ||
|
||
The grammar for HalleyAssist rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./src/RuleParser') |
Oops, something went wrong.