22
22
description : ' Author Name (Optional, for information)'
23
23
required : false
24
24
type : string
25
+ release :
26
+ types : [published]
25
27
26
28
jobs :
27
29
# Job for posting when a PR is merged
31
33
runs-on : ubuntu-latest
32
34
steps :
33
35
34
- # Add this step before the 'Post Merged PR to BlueSky' step
36
+ # Add this step before the 'Post Merged PR to BlueSky' step
35
37
- name : Debug Secret Availability
36
38
run : |
37
39
echo "BSKY_IDENTIFIER is set: ${{ secrets.BSKY_IDENTIFIER != '' }}"
@@ -50,24 +52,50 @@ jobs:
50
52
BSKY_IDENTIFIER : ${{ secrets.BSKY_IDENTIFIER }}
51
53
BSKY_PASSWORD : ${{ secrets.BSKY_PASSWORD }}
52
54
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
+
53
81
# Job for posting when manually triggered
54
82
post_manually :
55
83
# Only run this job for the workflow_dispatch trigger
56
84
if : github.event_name == 'workflow_dispatch'
57
85
runs-on : ubuntu-latest
58
86
steps :
59
87
60
- # Add this step before the 'Post Merged PR to BlueSky' step
88
+ # Add this step before the 'Post Merged PR to BlueSky' step
61
89
- name : Debug Secret Availability
62
90
run : |
63
91
echo "BSKY_IDENTIFIER is set: ${{ secrets.BSKY_IDENTIFIER != '' }}"
64
92
echo "BSKY_PASSWORD is set: ${{ secrets.BSKY_PASSWORD != '' }}"
65
-
93
+
66
94
- name : Post Manually to BlueSky
67
95
uses : myConsciousness/bluesky-post@v5
68
96
with :
69
97
# Use the text provided in the manual trigger input
70
98
text : ${{ format('{0} by @{1}', github.event.inputs.text, github.event.inputs.authorName) }}
71
99
link-preview-url : ${{ github.event.inputs.link }} # Use the link provided in the manual trigger input
72
100
identifier : ${{ secrets.BSKY_IDENTIFIER }}
73
- password : ${{ secrets.BSKY_PASSWORD }}
101
+ password : ${{ secrets.BSKY_PASSWORD }}
0 commit comments