Skip to content

chore: release main (#250) #162

chore: release main (#250)

chore: release main (#250) #162

Workflow file for this run

name: Tessl Publish
# Publishes a plugin to the Tessl registry when release-please cuts a release
# for it. release-please tags components as `<component>-v<version>` (e.g.
# `bun-v1.3.0`, `graphite-v2.1.0`) using a GitHub App token, so the tag push
# triggers this workflow. The component name matches the plugin directory under
# plugins/, and the checked-out tag already has the bumped version in
# plugins/<component>/.tessl-plugin/plugin.json, so `tessl plugin publish`
# publishes exactly that version.
#
# Only components that ship a .tessl-plugin/plugin.json are published; tags for
# any other component (apps/web, packages/*, plugins without a Tessl manifest)
# resolve to a missing manifest and the job no-ops.
#
# Requires repository secret TESSL_TOKEN (create via `tessl api-key create`).
# When the secret is absent the job no-ops with a warning instead of failing.
on:
push:
tags:
- '*-v*'
permissions:
id-token: write
contents: read
jobs:
publish:
name: Publish released plugin to Tessl
runs-on: ubuntu-latest
steps:
- name: Resolve component and check TESSL_TOKEN
id: guard
env:
TESSL_TOKEN: ${{ secrets.TESSL_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
# release-please tags components as <component>-v<version>; strip the
# trailing -v<version> to recover the plugin directory name.
component="${TAG%-v*}"
echo "component=$component" >> "$GITHUB_OUTPUT"
if [ -z "$TESSL_TOKEN" ]; then
echo "::warning::TESSL_TOKEN not configured — skipping Tessl publish"
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Checkout
if: steps.guard.outputs.skip != 'true'
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Verify plugin has a Tessl manifest
if: steps.guard.outputs.skip != 'true'
id: manifest
env:
COMPONENT: ${{ steps.guard.outputs.component }}
run: |
if [ -f "plugins/$COMPONENT/.tessl-plugin/plugin.json" ]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
else
echo "::notice::plugins/$COMPONENT has no .tessl-plugin/plugin.json — not a Tessl plugin, skipping"
echo "publish=false" >> "$GITHUB_OUTPUT"
fi
- name: Set up Tessl CLI
if: steps.guard.outputs.skip != 'true' && steps.manifest.outputs.publish == 'true'
uses: tesslio/setup-tessl@25ec223fc0da33b41b8044ff5ab2b85235f4f91e # v2
with:
token: ${{ secrets.TESSL_TOKEN }}
- name: Publish plugin
if: steps.guard.outputs.skip != 'true' && steps.manifest.outputs.publish == 'true'
env:
COMPONENT: ${{ steps.guard.outputs.component }}
run: tessl plugin publish "plugins/$COMPONENT"