use esbuild instead of webpack #6
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: NodeJS with Webpack | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [16.x] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache | |
| uses: actions/[email protected] | |
| id: node_modules-cache | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.node_modules-cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Zip | |
| run: git archive -o "${GITHUB_REPOSITORY#*/}.zip" --prefix="${GITHUB_REPOSITORY#*/}/" ${GITHUB_SHA} | |
| shell: bash | |
| - name: Upload zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.event.repository.name }} | |
| path: ${{ github.event.repository.name }}.zip |