Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Audit

on:
workflow_dispatch:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
pull_request:

permissions:
contents: read

jobs:

audit:
name: Run npm audit
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
runs-on: ubuntu-24.04
env:
HUSKY: 0

steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Get Node version
id: retrieve-node-version
run: |
NODE_NVMRC=$(cat .nvmrc)
NODE_VERSION=${NODE_NVMRC/v/''}
echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT"

- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}

- name: Install Node dependencies
run: npm ci

- name: Audit root package
run: npm audit --audit-level=high

- name: Install src-cli Node dependencies
run: npm ci
working-directory: src-cli

- name: Audit src-cli package
run: npm audit --audit-level=high
working-directory: src-cli
58 changes: 58 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build PR

on:
workflow_dispatch:
pull_request:
paths:
- 'src/**'
- 'src-cli/**'
- 'jslib/**'
- 'resources/**'
- 'scripts/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'angular.json'
- '.github/workflows/build-pr.yml'
- '!*.md'
- '!*.txt'

permissions:
contents: read

jobs:

build:
name: Webpack build check
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
runs-on: ubuntu-24.04
env:
HUSKY: 0

steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Get Node version
id: retrieve-node-version
run: |
NODE_NVMRC=$(cat .nvmrc)
NODE_VERSION=${NODE_NVMRC/v/''}
echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT"

- name: Setup Node Environment
uses: ./.github/actions/setup-node-env
with:
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}
platform: Linux

- name: Install Node dependencies
run: npm ci

- name: Build main and renderer
run: npm run build

- name: Build CLI
run: npm run build:cli
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
HUSKY: 0
permissions:
contents: read
steps:
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
tar -xvf "./keytar/linux/$keytarTarGz" -C ./keytar/linux

- name: Install
run: npm install
run: npm ci
Comment thread
JaredScar marked this conversation as resolved.

- name: Package CLI
run: npm run dist:cli:lin
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
HUSKY: 0
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -156,7 +158,7 @@ jobs:
tar -xvf "./keytar/macos/$keytarTarGz" -C ./keytar/macos

- name: Install
run: npm install
run: npm ci

- name: Package CLI
run: npm run dist:cli:mac
Expand Down Expand Up @@ -196,6 +198,7 @@ jobs:
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
_NODE_VERSION: ${{ needs.setup.outputs.node_version }}
HUSKY: 0
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -229,7 +232,7 @@ jobs:
7z e "./keytar/windows/$($keytarTar -f "win32")" -o"./keytar/windows"

- name: Install
run: npm install
run: npm ci

- name: Package CLI
run: npm run dist:cli:win
Expand Down
Loading