Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
57 changes: 57 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Validate Windows Build on PR

on:
pull_request:
branches:
- master # Runs only if the PR targets the master branch

jobs:
validate-build:
runs-on: ubuntu-latest

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Job Configuration and Environment
The job "validate-build" is set to run on "ubuntu-latest", providing a clean build environment. However, note that the workflow currently lacks an explicit permissions declaration. Defining minimal permissions (e.g., contents: read) is recommended to improve security.

steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for changelog generation

- name: Install pnpm
uses: pnpm/action-setup@v4

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Validate Windows Build on PR' step
Uses Step
uses 'pnpm/action-setup' with ref 'v4', not a pinned commit hash
with:
version: latest

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x # Ensures correct versioning
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
id: pnpm_cache_path
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm_cache_path.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Build
env:
ELECTRON_BUILDER_ALLOWED_EXECUTABLES: '*'
run: pnpm build

# - name: Verify Build Output
# shell: bash
# run: |
# if [[ -z $(find dist -type f -name "*.exe") ]]; then
# echo "❌ Build output not found! Skipping release."
# exit 1
# fi
# echo "✅ Build output found!"
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Generate Release Notes
run: |
pnpm add -g conventional-changelog-cli
conventional-changelog -p angular -i CHANGELOG.md -s -r 0
# - name: Generate Release Notes
# run: |
# pnpm add -g conventional-changelog-cli
# conventional-changelog -p angular -i CHANGELOG.md -s -r 0

- name: Build
env:
Expand Down
Loading