Skip to content

Update webpack.yml

Update webpack.yml #3

Workflow file for this run

name: NodeJS with Webpack
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
- name: Cache node_modules
uses: actions/cache@v3
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: node_modules
# An explicit key for restoring and saving the cache
key: ${{github.ref}}
- name: Install NPM packages
run: npm install
- name: Build
run: npm run build:prod
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
# A file, directory or wildcard pattern that describes what to upload
path: dist/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
draft: true
generate_release_notes: true
if: startsWith(github.ref, 'refs/tags/')