Skip to content

core functionality for form8ion plugins that manage github workflows

License

Notifications You must be signed in to change notification settings

form8ion/github-workflows-core

Repository files navigation

github-workflows-core

core functionality for form8ion plugins that manage github workflows

Node CI Workflow Status Codecov SLSA Level 2

Table of Contents

Usage

MIT license npm Try @form8ion/github-workflows-core on RunKit node

Installation

$ npm install @form8ion/github-workflows-core --save-prod

Example

Import

import {
  scaffoldCheckoutStep,
  scaffoldNodeSetupStep,
  scaffoldDependencyInstallationStep,
  scaffoldVerificationStep
} from '@form8ion/github-workflows-core';

Execute

(async () => {
  scaffoldCheckoutStep();

  scaffoldNodeSetupStep({versionDeterminedBy: 'nvmrc'});

  scaffoldDependencyInstallationStep();

  scaffoldVerificationStep();
})();

API

scaffoldCheckoutStep

Scaffolder to define the details for a step to check out the project in a GitHub workflow

scaffoldNodeSetupStep

Scaffolder to define the details for a step to set up a node.js environment in a GitHub workflow

Takes a single options object as an argument, containing:

versionDeterminedBy string (required)

Source of node version for use in the configured step. Valid options are nvmrc or matrix

scaffoldDependencyInstallationStep

Scaffolder to define the details for a step to install dependencies in a GitHub workflow

scaffoldVerificationStep

Scaffolder to define the details for a step to execute verification

Contributing

PRs Welcome Commitizen friendly Conventional Commits semantic-release: angular Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test