Announce every GitHub release on social, automatically
Tag a release and a short post goes out on X with the release notes link in a reply. Add one GitHub Actions workflow and one secret; Octopost does the posting.
The release is done. The announcement is not.
Most release announcements get skipped because they are a separate chore after the real work. Doing it from CI yourself means storing X OAuth tokens in your repo secrets, refreshing them every two hours, and chaining replies by hand.
Octopost holds the account connection. Your workflow sends one HTTPS request with one API key, and you can choose to approve each announcement before it publishes.
The workflow
Add OCTOPOST_API_KEY under Settings, Secrets and variables, Actions. Then commit this file:
.github/workflows/announce-release.yml
# .github/workflows/announce-release.yml
name: Announce release
on:
release:
types: [published]
jobs:
announce:
runs-on: ubuntu-latest
steps:
- name: Queue the announcement in Octopost
env:
OCTOPOST_API_KEY: ${{ secrets.OCTOPOST_API_KEY }}
REPO: ${{ github.event.repository.name }}
NAME: ${{ github.event.release.name || github.event.release.tag_name }}
URL: ${{ github.event.release.html_url }}
run: |
jq -n --arg text "$REPO $NAME is out." --arg url "$URL" '{
content: $text,
platforms: ["twitter"],
segments: [{ content: ("Release notes: " + $url) }],
queueStatus: "pending"
}' | curl -sf https://octopost.ink/api/posts \
-H "Authorization: Bearer $OCTOPOST_API_KEY" \
-H "Content-Type: application/json" \
-d @-Want it to publish without review? Swap the last field
published: trueOr skip CI and ask your agent (MCP)
Announce v2.4.0 on X. Summarize CHANGELOG.md in one post,
put the release URL in a reply, and queue it for my approval.With queueStatus: "pending" the post waits in your approval queue and goes out in your next queue slot after you approve it. The link sits in a reply so the first post is not a bare link. jq and curl are already on GitHub's Ubuntu runners. API details: Posts API, and the agent setup is on the Claude Code page.
Limits worth knowing
- The release title is posted as written. If you want a written summary instead, have your agent draft it through the MCP server, or put the summary in the release name.
- X counts each post: the main post is 1 unit, the reply with the link is 13. One release costs 14 of your plan’s monthly X units (Basic includes 500).
- Posts must fit 280 characters on X, with links counted as 23. A post that is too long fails with a clear error instead of being cut off.
- Private repositories work the same way, but the release URL will only open for people with access.
- Octopost has no GitHub app: the trigger is your workflow, so you control exactly when it runs.
Questions
Can I post to more than X?
Yes. Add any other account you have connected to the platforms array. The same request posts to each one, with the reply chain on networks that support threads.
What if the workflow runs twice?
Each request creates a post, so a re-run creates a second one. With approval on, you delete the duplicate in the queue before it goes out.
Does it work with GitLab or other CI?
Yes. It is one curl request with a Bearer API key, so any CI that can run curl works.
Where do I get the API key?
In the Octopost dashboard under API keys, after you start your plan. The trial is 7 days for $1.
Start for $1
Every plan includes the MCP server and the REST API. Basic is $29 a month for 3 accounts, Premium $79 for 10, Business $199 for unlimited. The first 7 days cost $1, then the plan renews monthly unless you cancel.
Try it 7 days for $1