This repository contains a collection of GitHub Actions reusable workflows that can be used in other repositories.
The build workflow contains the build, lint and test jobs, the build job is always available while options should activate the lint and the test job.
Every job in the build workflow would checkout the current repository first, then run the yarn and yarn build commands iteratively.
Example:
name: Build
on:
push:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
build:
uses: cordiverse/workflows/.github/workflows/build.yml@main
with:
lint: true
test: trueOptions:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
fetch-submodules |
boolean |
No | false |
Whether to fetch submodules |
node-version |
string |
No | null |
Node.js version |
lint |
boolean |
No | false |
Whether to run linting |
test |
boolean |
No | false |
Whether to run tests |
The publish workflow contains the publish job, which can publish your plugin(s) onto npmjs.com.
The publish job would checkout the current repository fist, then run the yarn, yarn build and yarn pub commands iteratively.
Example:
name: Publish
on:
push:
branches:
- main
jobs:
publish:
uses: cordiverse/workflows/.github/workflows/publish.yml@mainOptions:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
fetch-submodules |
boolean |
No | false |
Whether to fetch submodules |
node-version |
string |
No | null |
Node.js version |