Send Email
The send-email.yml workflow fires when a GitHub Release is published. It reads the draft file generated by Draft Email and sends emails to subscribers.
Manual approval gate
Section titled “Manual approval gate”This workflow uses a GitHub Actions environment (production) with required reviewers. When a release is published, the workflow starts but pauses before sending — you’ll see a yellow “Waiting for review” status in the Actions tab.
To proceed:
- Go to the workflow run in the Actions tab
- Review the draft file in the PR or repo (
drafts/vX.Y.Z.md) - Click Review deployments → Approve and deploy to send emails
- Or click Reject to cancel
Setting up the environment
Section titled “Setting up the environment”You must create the production environment in your repo settings:
- Go to Settings → Environments → New environment
- Name it
production - Check Required reviewers and add yourself (or your team)
Or via CLI:
# Get your GitHub user IDUSER_ID=$(gh api user --jq '.id')
# Create the environment with required reviewergh api repos/OWNER/REPO/environments/production -X PUT --input - <<EOF{ "reviewers": [{ "type": "User", "id": $USER_ID }]}EOFWhat it does
Section titled “What it does”- Extracts the version from the release tag (e.g.
v1.2.0→1.2.0) - Reads
drafts/v1.2.0.mdfrom the repo (ordrafts/v1.2.0-{audience}.mdfor multi-audience products) - Sends emails via the send-file composite action
Required secrets
Section titled “Required secrets”| Secret | Description |
|---|---|
FROM_EMAIL | Sender email address |
RESEND_API_KEY | Resend API key (if using Resend) |
| Subscriber store secrets | Depends on your SUBSCRIBER_STORE choice |
See Environment Variables for the full list.