-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (61 loc) · 1.69 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: orca:npm:ci
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20.12.2
- name: npm install, build, and test
run: |
npm ci
npm run lint
npm run dist
env:
HUSKY_SKIP_INSTALL: 1
CI: true
- name: run security audit of npm packages
run: |
npm run audit-ci
- name: run security check on code
id: code_security_scan
run: |
pip install --upgrade njsscan
njsscan .
- name: scan for exposed aws secrets
run: |
git clone https://github.com/awslabs/git-secrets.git
cd ./git-secrets
sudo make install
cd ../
rm -rf git-secrets
git secrets --register-aws
git-secrets --scan -r
- name: "Publish version of package to NPM registry"
uses: JS-DevTools/npm-publish@v1
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}
check-version: true
- name: Create a Release
if: steps.publish.outputs.type != 'none'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.publish.outputs.version }}
release_name: Release ${{ steps.publish.outputs.version }}
body: Automated release message to be implemented.
draft: false
prerelease: false