@chirag127/omni-publish
v0.1.2
Published
Auto-publish release notes / blog posts to multiple platforms (dev.to, Hashnode, Bluesky, Mastodon, Threads) + Telegram drafts queue for manual platforms (X, Reddit, LinkedIn, Medium). Platform fan-out is env-gated.
Maintainers
Readme
@chirag127/omni-publish
Auto-publish release notes / blog posts to multiple platforms on tag push or release create. Platform fan-out is filtered by which env vars are set — if only DEVTO_API_KEY exists, only dev.to is targeted.
Install
npm i -D @chirag127/omni-publish
# or
pnpm add -D @chirag127/omni-publishSupported platforms / env vars
Set the env var for each platform you want to publish to. Unset = skipped.
| Platform | Env var |
|--------------|----------------------|
| dev.to | DEVTO_API_KEY |
| Hashnode | HASHNODE_API_KEY |
| Medium | MEDIUM_API_KEY |
| X / Twitter | X_API_KEY |
| LinkedIn | LINKEDIN_API_KEY |
| Bluesky | BLUESKY_API_KEY |
| Mastodon | MASTODON_API_KEY |
| Reddit | REDDIT_API_KEY |
GitHub Actions
name: Cross-post release
on:
release: { types: [published] }
push: { tags: ['v*.*.*'] }
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx -y @chirag127/omni-publish
env:
DEVTO_API_KEY: ${{ secrets.DEVTO_API_KEY }}
HASHNODE_API_KEY: ${{ secrets.HASHNODE_API_KEY }}
MEDIUM_API_KEY: ${{ secrets.MEDIUM_API_KEY }}
X_API_KEY: ${{ secrets.X_API_KEY }}
LINKEDIN_API_KEY: ${{ secrets.LINKEDIN_API_KEY }}
BLUESKY_API_KEY: ${{ secrets.BLUESKY_API_KEY }}
MASTODON_API_KEY: ${{ secrets.MASTODON_API_KEY }}
REDDIT_API_KEY: ${{ secrets.REDDIT_API_KEY }}Status
v0.1.2 — telegram-announce adapter + dual-write drafts (Telegram + GitHub Issues) + routes option for 4-channel routing.
Part of the chirag127/oriz family.
Env vars (v0.1.2)
| Env var | Purpose |
|-------------------------------|------------------------------------------------------------------|
| TELEGRAM_BOT_TOKEN | Bot token for all Telegram channels. Aliased by TELEGRAM_DRAFTS_BOT_TOKEN (legacy). |
| TELEGRAM_ANNOUNCE_CHAT_ID | Public @oriz_announcements channel id. |
| TELEGRAM_DRAFTS_CHAT_ID | Private @oriz_drafts channel id (manual-platform queue). |
| TELEGRAM_OPS_CHAT_ID | Private @oriz_ops channel id (CI / mirror / health). |
| TELEGRAM_PAISA_CHAT_ID | Public @oriz_paisa channel id (finance content). |
| OMNI_DRAFTS_GH_PAT | GitHub PAT for chirag127/oriz-drafts Issues dual-write. |
Routes
publish() accepts a routes option that toggles the 4 destinations independently:
import { publish } from '@chirag127/omni-publish'
await publish({
title: 'Release v1.2.3',
body: '...',
canonical_url: 'https://...',
type: 'package',
tags: ['release'],
routes: {
announce: true, // default true → @oriz_announcements
drafts: true, // default true → @oriz_drafts + chirag127/oriz-drafts Issues
paisa: false, // default false → @oriz_paisa (also auto-on if tags include 'paisa'/'finance')
},
})The drafts route is a dual-write: every drafts call goes to both Telegram (4 per-platform messages) and a GitHub Issue in chirag127/oriz-drafts for searchable archival. Either backend failing is logged but does not fail the publish.
