Skip to content

Latest commit

 

History

History
117 lines (93 loc) · 6.92 KB

File metadata and controls

117 lines (93 loc) · 6.92 KB

Tessl Publish Action

Detect changed Tessl plugins, derive semantic version bumps from Conventional Commits, lint each changed plugin (optionally cloud-review), then publish to the Tessl registry. It can also commit the published .tessl-plugin/plugin.json version bumps back to the repo.

By default the quality gate is free tessl plugin lint. Set review-mode: review only when you intentionally want credit-burning tessl review run.

The action is implemented in TypeScript with the official GitHub Actions toolkit packages such as @actions/core, @actions/exec, and @actions/github, and is bundled with Vite+ via vp pack.

What It Does

  • Publishes only changed plugins on push
  • Publishes all plugins on workflow_dispatch
  • Maps changed files back to the nearest owning .tessl-plugin/plugin.json
  • Gates each plugin with free tessl plugin lint by default; optional review-mode: review runs credit-burning tessl review run first
  • Derives the next bump per tile from commit messages:
    • BREAKING CHANGE: or type(scope)!: -> major
    • feat: -> minor
    • everything else -> patch
  • Probes tessl plugin publish --dry-run --bump <type> and publishes with tessl plugin publish --bump <type>
  • Supports a manifest version strategy for explicit versions that must publish without mutation; retries accept an already-existing exact version
  • Commits published .tessl-plugin/plugin.json version bumps back to the current branch by default with github-actions[bot] and a skip-CI commit message, or with a caller-provided bot identity

Requirements

  • Run actions/checkout before this action
  • Run tesslio/setup-tessl before this action
  • Add a repository secret named TESSL_TOKEN in the consumer repo and pass it to tesslio/setup-tessl
  • Run this action only from trusted publish events such as push to the release branch or workflow_dispatch. The action refuses to publish from pull_request and pull_request_target

Usage

name: Publish Skills

on:
  push:
    branches:
      - main
    paths:
      - "skills/**"
  workflow_dispatch:

permissions:
  contents: write
  id-token: write

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Set up Tessl
        uses: tesslio/setup-tessl@v2
        with:
          token: ${{ secrets.TESSL_TOKEN }}

      - name: Publish changed plugins
        uses: uinaf/tessl-publish-action@v2.2.1
        with:
          review-mode: lint
          git-author-name: my-release-bot[bot]
          git-author-email: 123456789+my-release-bot[bot]@users.noreply.github.com
          git-committer-name: my-release-bot[bot]
          git-committer-email: 123456789+my-release-bot[bot]@users.noreply.github.com

Inputs

Name Default Description
working-directory . Repository root to operate from
skills-root skills Root directory containing plugin folders
review-mode lint lint for free plugin lint, or review for credit-burning tessl review run
review-threshold 90 Threshold for tessl review run when review-mode is review
dry-run-max-attempts 50 Max version attempts per plugin before giving up
publish-all false Force publishing all plugins regardless of event diff
version-strategy conventional Use Conventional Commit bumps or the unchanged manifest version
commit-version-bumps true Commit published .tessl-plugin/plugin.json version bumps back to the branch
version-bump-commit-message chore: sync published plugin versions [skip ci] Commit message used for the bot-authored version bump sync commit
git-author-name GIT_AUTHOR_NAME or github-actions[bot] Git author name for committed version bumps
git-author-email GIT_AUTHOR_EMAIL or GitHub Actions noreply Git author email for committed version bumps
git-committer-name GIT_COMMITTER_NAME or author name Git committer name for committed version bumps
git-committer-email GIT_COMMITTER_EMAIL or author email Git committer email for committed version bumps

Outputs

Name Description
tiles JSON array of plugin directories selected for this run. The output name is kept for backward compatibility.
versions JSON object of successfully published plugin versions keyed by plugin directory
failures JSON array of per-plugin failures

Manifest-pinned publication

Set version-strategy: manifest when the reviewed .tessl-plugin/plugin.json already contains the version to publish. The action omits --bump, does not mutate the manifest, and treats an already-existing exact version as an idempotent retry. Set commit-version-bumps: "false" so the workflow can keep read-only repository permissions. Consumers that require immutable-content proof should verify the installed registry artifact after this action succeeds.

Releasing This Action

With Node and Corepack enabled, install dependencies with the repository-pinned pnpm, then use the local Vite+ binary for verification and packaging:

  • pnpm install --frozen-lockfile
  • pnpm exec vp check
  • pnpm exec vp test
  • pnpm exec vp pack
  • pnpm exec vp run release

semantic-release still owns tag and GitHub Release creation on main, with releases created by github-actions[bot]. Consumer repos should pin either an explicit release tag such as @v2.1.1 or the full commit SHA that backs that release.