Skip to content

Update build.yml

Update build.yml #45

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- vot-cli/*
pull_request:
paths-ignore:
- vot-cli/*
release:
paths-ignore:
- vot-cli/*
workflow_dispatch:
paths-ignore:
- vot-cli/*
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 20.x, 21.x]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }} 🛎️
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Check Version 🛎️
shell: bash
run: node --version && npm --version
- name: Install 🔧
shell: bash
run: npm install
- name: Build 🔧
run: npm run build && npm run stats
- name: Upload Artifact 🚀
uses: actions/upload-artifact@v3
with:
path: dist/vot*.user.js
- name: Send bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}