From b8b4af3dc322b1335a764344a43a2a1ec052094a Mon Sep 17 00:00:00 2001 From: Reagan Fwamba <130037123+reagansfwamba@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:59:26 +0300 Subject: [PATCH] Create npm-gulp.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This GitHub Actions workflow automates the process of installing Node.js dependencies via npm, and running build or development tasks using Gulp.js. It helps streamline continuous integration (CI) for JavaScript projects that use Gulp as a task runner. 🔧 Key Features: ✅ Automatically triggers on every push or pull request to the main (or specified) branch. 🧰 Sets up the correct Node.js version using actions/setup-node. 📦 Installs project dependencies with npm ci to ensure consistent installs based on the package-lock.json. 🚀 Executes gulp tasks to automate builds, testing, or other custom dev workflows. 📄 Ensures logs and build status are visible within GitHub Actions for easy debugging and monitoring. 📁 File Location: .github/workflows/npm-gulp.yml 🛠 Example Use Cases: Frontend web apps that compile SCSS, minify JS/CSS, or bundle files using Gulp. Automated deployment workflows that rely on asset pipelines. CI pipelines for JavaScript tools and libraries built using Gulp. --- .github/workflows/npm-gulp.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/npm-gulp.yml diff --git a/.github/workflows/npm-gulp.yml b/.github/workflows/npm-gulp.yml new file mode 100644 index 000000000..6d04c0d55 --- /dev/null +++ b/.github/workflows/npm-gulp.yml @@ -0,0 +1,28 @@ +name: NodeJS with Gulp + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +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 + gulp