NodeJS with Webpack #92
This file contains 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: | |
workflow_dispatch: | |
inputs: | |
mode: | |
description: 'Webpack Mode' | |
required: true | |
default: 'development' | |
type: choice | |
options: | |
- development | |
- production | |
- none | |
# push: we dont need this anymore | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Create PenguinScript Out | |
run: | | |
sudo mkdir /psout | |
- name: Build | |
run: | | |
sudo npm install | |
sudo npx webpack --mode ${{ inputs.mode }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundled-files | |
path: /psout/main.js |