Skip to content

Commit 10042b8

Browse files
Copilotnbauma109
andauthored
Add crosspost workflow to announce new releases on social media (#344)
* chore: add crosspost workflow for social media on release Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/402223ab-e029-4ff2-8910-ff26d7c56cfb Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: fix since parameter type in crosspost workflow Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/402223ab-e029-4ff2-8910-ff26d7c56cfb Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: trigger crosspost only on release creation Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/76159f6a-79c5-4798-8388-73323f954e68 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: harden crosspost workflow action pinning and permissions Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/76159f6a-79c5-4798-8388-73323f954e68 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: improve crosspost rerun resilience and dynamic repo naming Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/76159f6a-79c5-4798-8388-73323f954e68 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: target crosspost to exact created release tag Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/76159f6a-79c5-4798-8388-73323f954e68 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * chore: remove redundant since filter from crosspost workflow Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/76159f6a-79c5-4798-8388-73323f954e68 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * fix: dispatch crosspost from release workflow and document provider tokens Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/a2aafe6b-da5d-402e-90d8-4d0e476e0c98 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * docs: add per-provider API cost/free details for crossposting Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/f2f5eebd-8609-424e-b65b-c5d4236d06d2 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * docs: clarify BLUESKY_IDENTIFIER for custom domain handles Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/89deb043-090b-4f5c-9f56-1ae75d6d5bd9 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * docs: fix dev.to api key setup path Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/a091dd1b-4814-43b1-b957-969cf2428936 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> * ci/docs: remove X/Twitter crossposting configuration Agent-Logs-Url: https://github.com/nbauma109/jd-gui-duo/sessions/fe1dee0e-de57-4968-b530-1a75dd14f2c6 Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nbauma109 <9403560+nbauma109@users.noreply.github.com> Co-authored-by: Nicolas Baumann <nbauma109@users.noreply.github.com>
1 parent ba81990 commit 10042b8

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

.github/workflows/crosspost.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Crosspost Release to Social Media"
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: Release tag to crosspost (for dispatches from release workflow)
10+
required: true
11+
type: string
12+
13+
jobs:
14+
crosspost:
15+
name: "Crosspost to Social Media"
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- name: Crosspost to Bluesky, Mastodon, and Dev.to
21+
uses: tgagor/action-crosspost@9523ff489bc74e1a9849c5d3071b6bcbad40042d # v1.6.3
22+
with:
23+
feed-url: https://github.com/${{ github.repository }}/releases.atom
24+
limit: 1
25+
filter-urls: |
26+
/releases/tag/${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }}
27+
message: |
28+
🎉 New release of ${{ github.event.repository.name }} is out!
29+
{url}
30+
#Java #JavaDecompiler #OpenSource #ReverseEngineering
31+
bluesky-host: bsky.social
32+
bluesky-identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
33+
bluesky-password: ${{ secrets.BLUESKY_PASSWORD }}
34+
mastodon-access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
35+
mastodon-host: ${{ secrets.MASTODON_HOST }}
36+
devto-api-key: ${{ secrets.DEVTO_API_KEY }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ jobs:
102102
$repo = "${{ github.repository }}"
103103
104104
gh workflow run rewrite-release-notes.yml --repo $repo
105+
gh workflow run crosspost.yml --repo $repo -f tag=$tag

docs/distribution-submission.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,81 @@ Optional variable:
3838
If `PAT_TOKEN` is not configured, the workflow still prepares the manifests for manual submission to `microsoft/winget-pkgs`.
3939

4040
The Chocolatey and WinGet workflows are dispatch-only. The SignPath Windows signing workflow dispatches them after it replaces the release assets with signed Windows binaries, so package checksums are computed from the final signed downloads. Manual dispatches require a release tag and use the tagged sources for packaging logic and release assets.
41+
42+
## Social crosspost secrets
43+
44+
The release pipeline dispatches `.github/workflows/crosspost.yml` after creating a release. Configure the following repository secrets in **GitHub → Settings → Secrets and variables → Actions**.
45+
46+
### Bluesky
47+
48+
- `BLUESKY_IDENTIFIER` — your Bluesky handle, i.e. the last segment of your profile URL.
49+
Look at your profile URL:
50+
- `https://bsky.app/profile/yourname.bsky.social` → set to `yourname.bsky.social`
51+
- `https://bsky.app/profile/javadecompiler.org` → set to `javadecompiler.org`
52+
53+
In short: use the part that comes after `https://bsky.app/profile/`, whether it is a `.bsky.social` subdomain or a custom domain.
54+
- `BLUESKY_PASSWORD` (recommended: an app password, not your main account password)
55+
56+
Create an app password in Bluesky:
57+
58+
1. Open Bluesky settings.
59+
2. Go to **Privacy and Security → App Passwords**.
60+
3. Create an app password and store it in `BLUESKY_PASSWORD`.
61+
62+
API posting cost (as of 2026-05):
63+
64+
- Free (`$0`) on official Bluesky infrastructure.
65+
- No paid API tier is required for normal posting.
66+
- Subject to rate limits (for example, write-point quotas) documented here:
67+
- https://docs.bsky.app/docs/advanced-guides/rate-limits
68+
69+
### Mastodon
70+
71+
- `MASTODON_HOST` (for example `mastodon.social`)
72+
- `MASTODON_ACCESS_TOKEN`
73+
74+
Create a token in your Mastodon instance:
75+
76+
1. Open your account **Preferences → Development**.
77+
2. Create a new application with posting scope (`write:statuses`).
78+
3. Copy the generated access token to `MASTODON_ACCESS_TOKEN`.
79+
80+
API posting cost:
81+
82+
- Free (`$0`) from the Mastodon software/project perspective.
83+
- There is no central Mastodon API fee.
84+
- Potential indirect costs depend on where you post:
85+
- public instance: usually free (`$0`) unless that instance has its own policy
86+
- self-hosted instance: you pay your own server/hosting costs
87+
- Official API docs:
88+
- https://docs.joinmastodon.org/client/intro/
89+
- https://docs.joinmastodon.org/methods/
90+
91+
### Dev.to
92+
93+
- `DEVTO_API_KEY`
94+
95+
Get it from Dev.to:
96+
97+
1. Open https://dev.to/settings/extensions
98+
2. In **DEV API Keys**, create or copy your API key.
99+
3. Save it as `DEVTO_API_KEY`.
100+
101+
API posting cost:
102+
103+
- Free (`$0`) for standard API publishing.
104+
- No paid API tier is documented for normal article posting.
105+
- API usage is rate-limited; see official docs:
106+
- https://developers.forem.com/
107+
- https://developers.forem.com/api/v0
108+
109+
### GitHub token for downstream workflow dispatch
110+
111+
- `PAT_TOKEN`
112+
113+
This token is used by `release.yml` to dispatch downstream workflows (`rewrite-release-notes.yml` and `crosspost.yml`) after release creation.
114+
115+
1. Create a personal access token for a maintainer account.
116+
2. Ensure it can run workflows in this repository (for classic tokens, include `repo` and `workflow` scopes).
117+
3. Save it as `PAT_TOKEN` in repository Actions secrets.
118+

0 commit comments

Comments
 (0)