Skip to content

activadee/open-workflows

Repository files navigation

open-workflows

GitHub automation workflows via composite actions. AI-powered reviews, labeling, and doc sync - plus automated releases with npm provenance.

Quick Start

bunx @activade/open-workflows

The CLI will prompt you to select workflows and install them to .github/workflows/.

Available Actions

Action AI Description
pr-review Yes AI-powered code reviews
issue-label Yes Auto-label issues based on content
doc-sync Yes Keep docs in sync with code changes
changeset Yes AI-generated changesets for monorepo releases
release No Semantic versioning with npm provenance

Manual Usage

AI-Powered Actions

name: PR Review
on:
  pull_request:
jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: activadee/open-workflows/actions/pr-review@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

Release Action (No AI)

name: Release
on:
  workflow_dispatch:
    inputs:
      bump:
        description: 'Version bump'
        required: true
        type: choice
        options: [patch, minor, major]
jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: activadee/open-workflows/actions/release@main
        with:
          bump: ${{ inputs.bump }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

No NPM_TOKEN needed - uses OIDC trusted publishing with provenance.

Changeset Action (AI-Powered)

name: AI Changeset
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  changeset:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          ref: ${{ github.head_ref }}
          token: ${{ secrets.GITHUB_TOKEN }}
      - uses: activadee/open-workflows/actions/changeset@main
        with:
          mode: commit  # or 'comment' to suggest via PR comment
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

The changeset action analyzes PR changes and generates Changesets files automatically:

  • Detects which packages are affected in monorepos
  • Infers version bump type from conventional commits
  • Writes user-facing changelog entries

Authentication

For AI Actions

Option 1: API Key

gh secret set ANTHROPIC_API_KEY

Option 2: Claude Max (OAuth)

Use the opencode-auth-sync plugin to automatically sync your OAuth tokens:

bunx @activade/opencode-auth-sync

Or manually set the secret:

gh secret set OPENCODE_AUTH < ~/.local/share/opencode/auth.json

CLI Options

bunx @activade/open-workflows [OPTIONS]

OPTIONS
  --force, -f    Override existing files without prompts
  --version, -v  Display version
  --help, -h     Display help

How It Works

AI Actions (pr-review, issue-label, doc-sync, changeset):

  1. Workflow triggers on GitHub event
  2. Composite action sets up Bun and OpenCode
  3. OpenCode runs with the bundled skill
  4. AI analyzes content and takes action

Changeset Action:

  1. Triggers on PR open/update
  2. AI analyzes diff, commits, and PR description
  3. Generates .changeset/<random>.md with package bumps and changelog
  4. Either commits to PR branch or suggests via comment

Release Action:

  1. Manually triggered with version bump type
  2. Generates changelog from git commits
  3. Publishes to npm with provenance
  4. Creates GitHub release with notes

Customizing

Fork this repository and modify:

  • actions/*/skill.md - AI behavior for AI-powered actions
  • scripts/*.ts - OpenCode custom tools (submit-review, apply-labels)
  • actions/release/src/publish.ts - Release logic

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •