moadim 0.19.0

Loop engine for AI agents — routines over REST, MCP, and a built-in web UI
name: Changeset Release

# Keep a standing "Version Packages" PR up to date as changesets land on
# `main`: it bumps `package.json`, syncs that version into
# `Cargo.toml`/`Cargo.lock` and rolls the pending changesets into a dated
# CHANGELOG.md section (both via `pnpm version-packages`, see
# scripts/release/version-and-sync.mjs), and consumes the `.changeset/*.md`
# files. Merging that PR is what actually cuts a release: it lands a bumped
# `Cargo.toml`, which `auto-release.yml` then tags and hands off to
# `publish.yml`/`release.yml` — this workflow never publishes or tags
# anything itself, it only prepares the version-bump PR.
#
# Uses a `RELEASE_PAT` (a repo-provisioned fine-grained PAT) instead of the
# default GITHUB_TOKEN: PRs opened with the default token don't trigger other
# `pull_request` workflows (lint.yml, test.yml, changelog.yml), so the Version
# Packages PR would merge with zero CI signal otherwise.

on:
  push:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}
  cancel-in-progress: false

permissions:
  contents: write
  pull-requests: write

jobs:
  version:
    name: Version Packages PR
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
        with:
          fetch-depth: 0
          token: ${{ secrets.RELEASE_PAT }}

      - name: Install pnpm
        uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9

      - name: Install Node.js
        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
        with:
          node-version: 22
          cache: pnpm

      - name: Install Rust
        uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
        with:
          toolchain: stable

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Create/update Version Packages PR
        uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
        with:
          version: pnpm version-packages
          commit: "chore(release): version packages"
          title: "chore(release): version packages"
        env:
          GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}