Merge pull request #3 from AthilioDev/dependabot/github_actions/actio… #2
This file contains hidden or 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
| name: CodeeForge • Windows CodeeForge Build | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| name: Build CodeeForge Windows (Portable) | |
| runs-on: windows-2022 | |
| steps: | |
| # ------------------------- | |
| # CHECKOUT | |
| # ------------------------- | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| # ------------------------- | |
| # NODE FIXO (VSCode SAFE) | |
| # ------------------------- | |
| - name: Setup Node.js 20 LTS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.11.1 | |
| cache: 'npm' | |
| # ------------------------- | |
| # VALIDAR PROJETO | |
| # ------------------------- | |
| - name: Validate Project Structure | |
| shell: pwsh | |
| run: | | |
| if (!(Test-Path "package.json")) { exit 1 } | |
| if (!(Test-Path "gulpfile.mjs")) { exit 1 } | |
| node -v | |
| npm -v | |
| # ------------------------- | |
| # DEPENDÊNCIAS NPM (LOCKED) | |
| # ------------------------- | |
| - name: Install NPM Packages | |
| shell: pwsh | |
| run: | | |
| npm ci --no-fund --no-audit | |
| # ------------------------- | |
| # BUILD VSCode CORE | |
| # ------------------------- | |
| - name: Compile | |
| shell: pwsh | |
| run: npm run gulp compile | |
| # ------------------------- | |
| # BUILD WINDOWS PORTABLE | |
| # ------------------------- | |
| - name: Build CodeeForge Windows | |
| shell: pwsh | |
| run: npm run gulp vscode-win32-x64-ci | |
| # ------------------------- | |
| # ZIP PORTABLE | |
| # ------------------------- | |
| - name: Zip CodeeForge Portable | |
| shell: pwsh | |
| run: | | |
| $build = Join-Path $env:GITHUB_WORKSPACE "out" | |
| $dir = Get-ChildItem $build -Directory | | |
| Where-Object { $_.Name -like "*win32-x64*" } | | |
| Select-Object -First 1 | |
| if (!$dir) { exit 1 } | |
| Compress-Archive -Path "$($dir.FullName)\*" ` | |
| -DestinationPath "$env:GITHUB_WORKSPACE\CodeeForge-windows-portable.zip" | |
| # ------------------------- | |
| # UPLOAD | |
| # ------------------------- | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: CodeeForge-windows-portable | |
| path: CodeeForge-windows-portable.zip |