remove pnpm lock file explication #5
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: Build | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build extension | |
| steps: | |
| # ----------------------------------------------------------------------------- | |
| # Checkout repository at the current commit. | |
| # This ensures that the workflow runs against the latest code pushed | |
| # to main, develop, or a PR branch. | |
| # ----------------------------------------------------------------------------- | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # ----------------------------------------------------------------------------- | |
| # Setup pnpm (v9) and enable built-in cache. | |
| # This automatically caches pnpm’s global store between workflow runs. | |
| # We install pnpm before Node.js so the cache is recognized properly. | |
| # ----------------------------------------------------------------------------- | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| run_install: false | |
| cache: true | |
| # ----------------------------------------------------------------------------- | |
| # Setup Node.js (v22). | |
| # No caching is needed here because pnpm’s action handles it directly. | |
| # ----------------------------------------------------------------------------- | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '22' | |
| # ----------------------------------------------------------------------------- | |
| # Install dependencies using the locked versions from pnpm-lock.yaml. | |
| # This ensures reproducible builds and avoids accidental version drift. | |
| # ----------------------------------------------------------------------------- | |
| - name: Install dependencies | |
| run: pnpm install | |
| # ----------------------------------------------------------------------------- | |
| # Build the browser extension. | |
| # The build command should generate the production-ready "dist/" directory. | |
| # ----------------------------------------------------------------------------- | |
| - name: Build extension | |
| run: pnpm build | |
| # ----------------------------------------------------------------------------- | |
| # Upload the built "dist/" folder as an artifact. | |
| # This allows developers or later workflows (like release) to download and verify it. | |
| # ----------------------------------------------------------------------------- | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eons-dev-launcher-build | |
| path: dist/ | |
| retention-days: 7 |