Skip to content

🔨 Build › CI

🔨 Build › CI #102

Workflow file for this run

name: '🔨 Build › CI'
run-name: '🔨 Build › CI'
on:
# #
# Trigger › Workflow Dispatch
#
# If any values are not provided, will use fallback env variable
# #
workflow_dispatch:
inputs:
# #
# Name of the plugin to use when creating the release zip / exe filename
# e.g: kdbxweb-v1.0.0.zip
# #
PLUGIN_NAME:
description: "📦 Name of App"
required: true
default: 'kdbxweb'
type: string
# #
# Trigger › Push
# #
push:
branches:
- master
- main
tags:
- '*'
# #
# Trigger › Pull Requests
# #
pull_request:
# #
# Environment Vars
#
# PLUGIN_NAME This is the project name used in Cloudflare.
# #
env:
PLUGIN_NAME: ${{ github.event.inputs.PLUGIN_NAME || 'kdbxweb' }}
BOT_NAME_1: EuropaServ
BOT_NAME_DEPENDABOT: dependabot[bot]
# #
# Jobs
# #
jobs:
job-ci:
runs-on: ubuntu-latest
steps:
# #
# CI › Start
# #
- name: '✅ Start'
id: task_ci_start
run: |
echo "Starting linter"
# #
# CI › Checkout
# #
- name: '✅ Checkout'
id: task_ci_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# #
# CI › Setup Node
# #
- name: '⚙️ Setup Node'
id: task_ci_node_setup
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: '18'
registry-url: 'https://registry.npmjs.org'
# #
# CI › Node Clean Install
# #
- name: '🕛 NPM › Clean Install'
id: task_ci_npm_install
run: |
npm ci
# #
# CI › Build
# #
- name: '🔨 NPM › Build'
id: task_ci_npm_build
run: npm start
# #
# CI › Tests › Coveralls
# #
- name: '🧪 Tests › Submit Coveralls'
id: task_ci_tests_coverage
uses: coverallsapp/github-action@master
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# #
# CI › NPM › Publish
# #
- name: '📦 NPM › Publish'
id: task_ci_npm_publish
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}