2222 description : ' Author Name (Optional, for information)'
2323 required : false
2424 type : string
25+ release :
26+ types : [published]
2527
2628jobs :
2729 # Job for posting when a PR is merged
3133 runs-on : ubuntu-latest
3234 steps :
3335
34- # Add this step before the 'Post Merged PR to BlueSky' step
36+ # Add this step before the 'Post Merged PR to BlueSky' step
3537 - name : Debug Secret Availability
3638 run : |
3739 echo "BSKY_IDENTIFIER is set: ${{ secrets.BSKY_IDENTIFIER != '' }}"
@@ -50,24 +52,50 @@ jobs:
5052 BSKY_IDENTIFIER : ${{ secrets.BSKY_IDENTIFIER }}
5153 BSKY_PASSWORD : ${{ secrets.BSKY_PASSWORD }}
5254
55+ # Job for posting when a PR is merged
56+ post_on_release :
57+ # Only run this job for the pull_request trigger IF it was merged
58+ if : github.event_name == 'release'
59+ runs-on : ubuntu-latest
60+ steps :
61+
62+ # Add this step before the 'Post Merged PR to BlueSky' step
63+ - name : Debug Secret Availability
64+ run : |
65+ echo "BSKY_IDENTIFIER is set: ${{ secrets.BSKY_IDENTIFIER != '' }}"
66+ echo "BSKY_PASSWORD is set: ${{ secrets.BSKY_PASSWORD != '' }}"
67+
68+ - name : Post Merged PR to BlueSky
69+ uses : myConsciousness/bluesky-post@v5
70+ with :
71+ # Use PR title and author login for the text
72+ text : ${{ format('New Release {0} is out 🎉', github.event.release.name) }}
73+ # Use the PR's HTML URL for the link preview
74+ link-preview-url : ${{ github.event.release.html_url }} # Use html_url, it's more standard
75+ identifier : ${{ secrets.BSKY_IDENTIFIER }}
76+ password : ${{ secrets.BSKY_PASSWORD }}
77+ env :
78+ BSKY_IDENTIFIER : ${{ secrets.BSKY_IDENTIFIER }}
79+ BSKY_PASSWORD : ${{ secrets.BSKY_PASSWORD }}
80+
5381 # Job for posting when manually triggered
5482 post_manually :
5583 # Only run this job for the workflow_dispatch trigger
5684 if : github.event_name == 'workflow_dispatch'
5785 runs-on : ubuntu-latest
5886 steps :
5987
60- # Add this step before the 'Post Merged PR to BlueSky' step
88+ # Add this step before the 'Post Merged PR to BlueSky' step
6189 - name : Debug Secret Availability
6290 run : |
6391 echo "BSKY_IDENTIFIER is set: ${{ secrets.BSKY_IDENTIFIER != '' }}"
6492 echo "BSKY_PASSWORD is set: ${{ secrets.BSKY_PASSWORD != '' }}"
65-
93+
6694 - name : Post Manually to BlueSky
6795 uses : myConsciousness/bluesky-post@v5
6896 with :
6997 # Use the text provided in the manual trigger input
7098 text : ${{ format('{0} by @{1}', github.event.inputs.text, github.event.inputs.authorName) }}
7199 link-preview-url : ${{ github.event.inputs.link }} # Use the link provided in the manual trigger input
72100 identifier : ${{ secrets.BSKY_IDENTIFIER }}
73- password : ${{ secrets.BSKY_PASSWORD }}
101+ password : ${{ secrets.BSKY_PASSWORD }}
0 commit comments