Skip to content
ContractSpec
Start here

action.version

GitHub Action for ContractSpec version management

appsappv5.0.4stableservernode
@lssm-tech/action.version
bun add @lssm-tech/action.version
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

GitHub Action for automated ContractSpec version management in CI.

What It Does

  • Standalone action with no workspace dependencies
  • Configured entirely via action.yml; no TypeScript source

Usage

yaml
name: ContractSpec Version Manager
on: pull_request
jobs:
  contractspec:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      packages: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v6
      - uses: lssm-tech/contractspec/packages/apps/action-version@main
        with:
          github-packages-token: ${{ secrets.CONTRACTSPEC_PACKAGES_TOKEN }}

For affected private GitHub Packages dependencies, github-packages-token must be a GitHub token that can read the ContractSpec packages granted to the consuming repository, bot, or GitHub App.

Inputs

  • mode (default: analyze) — Action mode: analyze (check only) or bump (apply changes)
  • auto-bump (default: false) — Whether to automatically applying bumps based on impact analysis
  • commit-message (default: chore(release): bump spec versions [skip ci]) — Commit message for version bumps
  • create-pr (default: false) — Create a Pull Request instead of pushing directly
  • pr-title (default: chore(release): version packages) — Title for the Pull Request
  • pr-branch (default: release/next-versions) — Branch name for the Pull Request
  • github-token (default: ${{ github.token }}) — GitHub Token for creating PRs
  • github-packages-token — Optional token used to configure private GitHub Packages auth before dependency installs

Outputs

  • has-changes — Whether changes were detected/applied
  • specs-bumped — Number of specs bumped

Key Files

  • action.yml — GitHub Action definition (entry point)
  • tests/action-version.test.ts — standalone host test (bun run test): runs the action.yml steps locally with recording bun/bunx/git/gh stubs; requires jq

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed
  • PublishConfig not supported by bun
  • Move automation into actions

Notes

  • Do not change action.yml inputs/outputs without updating downstream workflow consumers
  • This is a standalone action — avoid adding workspace dependencies unless necessary

Relationships

THIS PACKAGEaction.version1 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

1 declarations

Declared capabilities

This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.

Scripts

  • testbun test