diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..208c99e --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,63 @@ +# Automatically assigns labels to PRs based on file changes + +# General Labels +'๐ŸŸข dependencies': + - 'package.json' + - 'pnpm-lock.yaml' + - 'yarn.lock' + - 'npm-shrinkwrap.json' + +'changelog': + - 'CHANGELOG.md' + +# โšก Electron-Specific Labels +'electron-main': + - 'src/main/**' + - 'electron/**' + +'electron-renderer': + - 'src/renderer/**' + - 'src/components/**' + - 'src/pages/**' + +# UI & Frontend +'๐ŸŽจ ui': + - 'src/renderer/assets/**' + - 'src/styles/**' + - 'src/css/**' + +# Build & Configuration +'๐Ÿ—๏ธ build': + - 'webpack.config.js' + - 'vite.config.js' + - 'babel.config.js' + - 'tsconfig.json' + - 'esbuild.config.js' + - '.eslintrc.js' + - '.prettierrc' + - 'scripts/**' + +# Testing +'๐Ÿงช tests': + - 'tests/**' + - '__tests__/**' + - 'jest.config.js' + - 'vitest.config.js' + +# CI/CD & GitHub Actions +'๐Ÿ› ๏ธ ci/cd': + - '.github/workflows/**' + - '.github/labeler.yml' + +# Documentation +'๐Ÿ“„ docs': + - 'docs/**' + - 'README.md' + - 'CONTRIBUTING.md' + - 'docs/**/*.md' + +# Hotfix +'๐Ÿ”ฅ hotfix': + - 'src/**' + - 'electron/**' + - 'package.json' diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..0535e7d --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,60 @@ +name: Validate Windows Build on PR + +on: + pull_request: + branches: + - master # Runs only if the PR targets the master branch + +permissions: + contents: read + +jobs: + validate-build: + runs-on: windows-latest + + 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 + 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!" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f71b881..efeb549 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: