Skip to content

Commit 4831f49

Browse files
nzakasmdjermanovic
andauthored
build: Generate social media changelog announcement (#132)
* build: Generate social media changelog announcement * Update .github/workflows/release-please.yml Co-authored-by: Milos Djermanovic <[email protected]> --------- Co-authored-by: Milos Djermanovic <[email protected]>
1 parent 7718773 commit 4831f49

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release-please.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
branches:
44
- main
55
name: release-please
6+
7+
permissions:
8+
models: read
9+
610
jobs:
711
release-please:
812
runs-on: ubuntu-latest
@@ -36,8 +40,14 @@ jobs:
3640
npx jsr publish
3741
if: ${{ steps.release.outputs.release_created }}
3842

43+
# Generates the social media post
44+
- run: npx @humanwhocodes/social-changelog --org ${{ github.repository_owner }} --repo ${{ github.event.repository.name }} --tag ${{ steps.release.outputs.tag_name }} > social-post.txt
45+
if: ${{ steps.release.outputs.release_created }}
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
3949
- name: Post release announcement
40-
run: 'npx @humanwhocodes/crosspost -t -m -b "eslint/css v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released:\n\n${{ steps.release.outputs.html_url }}"'
50+
run: npx @humanwhocodes/crosspost -t -b -m --file social-post.txt
4151
if: ${{ steps.release.outputs.release_created }}
4252
env:
4353
TWITTER_API_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}

0 commit comments

Comments
 (0)