Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/draft-email.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Draft Email

on:
pull_request:
types: [opened, synchronize]
branches: [main]

jobs:
draft:
if: startsWith(github.head_ref, 'release-please--')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Extract version from PR branch
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "value=$VERSION" >> "$GITHUB_OUTPUT"

- name: Generate draft
uses: atriumn/cryyer/.github/actions/draft-file@v0
id: draft
with:
product: tokencost
version: ${{ steps.version.outputs.value }}
llm-provider: gemini
llm-model: gemini-3-flash-preview
llm-api-key: ${{ secrets.GEMINI_API_KEY }}

- name: Commit draft
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add drafts/
git diff --cached --quiet && exit 0
git commit -m "chore: draft email for v${{ steps.version.outputs.value }}"
git push
29 changes: 29 additions & 0 deletions .github/workflows/send-email.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Send Email

on:
release:
types: [published]

jobs:
send:
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
steps:
- uses: actions/checkout@v6

- name: Extract version
id: version
run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

- name: Send email
uses: atriumn/cryyer/.github/actions/send-file@v0
with:
product: tokencost
draft-path: drafts/v${{ steps.version.outputs.value }}.md
from-email: ${{ secrets.FROM_EMAIL }}
email-api-key: ${{ secrets.RESEND_API_KEY }}
subscriber-store: gist
github-gist-id: ${{ secrets.SUBSCRIBERS_GIST_ID }}
github-token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
Empty file added drafts/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions products/tokencost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
id: tokencost
name: tokencost
repo: atriumn/tokencost-dev
tagline: LLM Pricing Oracle — real model pricing data via MCP
voice: >
Concise and developer-friendly. Lead with what changed and why it matters.
Skip marketing fluff — our audience is technical users who integrate tokencost
into their AI workflows. Use plain language, short paragraphs, and bullet points.
emailSubjectTemplate: "tokencost {{version}} — what's new"
from_name: tokencost
reply_to: jeff@atriumn.com