Skip to content

Get workflow building dist zip under GH Action #7

Get workflow building dist zip under GH Action

Get workflow building dist zip under GH Action #7

Workflow file for this run

name: NodeJS with Webpack
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.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: Build
run: |
npm install
npx run build
# Upload the dist folder as an artifact if needed for subsequent jobs or storage
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: dist-folder
path: dist/
# create a zip file of the dist folder for easier download
- name: Zip dist folder
run: zip -r typex.zip dist/
- name: Upload dist.zip as artifact
uses: actions/upload-artifact@v4
with:
name: dist-zip
path: typex.zip