This repository contains a collection of reusable GitHub Actions workflows for Node.js projects.
Standard CI workflow for Node.js projects. Runs install, lint, build, and test.
File: .github/workflows/ci-node.yaml
Usage:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
ci:
uses: stevezhu/actions/.github/workflows/ci-node.yaml@v1CI workflow optimized for Monorepos using Turborepo. Checks for affected packages.
File: .github/workflows/ci-node-turbo.yaml
Usage:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
ci:
uses: stevezhu/actions/.github/workflows/ci-node-turbo.yaml@v1Automates publishing packages to the NPM registry. Requires NPM_TOKEN secret to be set in the repository or organization.
File: .github/workflows/npm-publish.yaml
Usage:
name: Publish
on:
release:
types: [published]
jobs:
publish:
uses: stevezhu/actions/.github/workflows/npm-publish.yaml@v1
permissions:
contents: read
id-token: write
secrets: inherit # Add this to inherit NPM_TOKEN from repo secrets if neededAutomates version bumping (patch, minor, major) and creating release PRs.
File: .github/workflows/npm-bump-version.yaml
Usage:
name: Bump Package Version
on:
workflow_dispatch:
inputs:
version_type:
description: "Version bump type"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
uses: stevezhu/actions/.github/workflows/npm-bump-version.yaml@v1
permissions:
contents: write
pull-requests: write
with:
version_type: ${{ inputs.version_type }}Validates that PR titles follow the Conventional Commits specification.
File: .github/workflows/lint-pr-title.yaml
Usage:
name: Lint PR Title
on:
pull_request:
types:
- opened
- reopened
- edited
# - synchronize (if you use required Actions)
jobs:
main:
uses: stevezhu/actions/.github/workflows/lint-pr-title.yaml@v1
permissions:
pull-requests: read