-
Notifications
You must be signed in to change notification settings - Fork 784
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2256 from AxonFramework/release-notification-discuss
Release announcement on discuss
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Announce release on Discuss | ||
|
||
env: | ||
CA_FILE: /tmp/ca.pem | ||
URL: https://discuss.axoniq.io/posts.json | ||
|
||
# id of `Announcements` category in Discuss | ||
CATEGORY: 6 | ||
|
||
on: | ||
# Triggers the workflow on new release | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
announce: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Get authorities certificates | ||
run: openssl s_client -showcerts -connect discuss.axoniq.io:443 </dev/null | sed -n -e '/-.BEGIN/,/-.END/ p' > $CA_FILE | ||
|
||
- name: Create Discuss topic | ||
run: | | ||
echo $json | curl --cacert $CA_FILE -X POST "$URL" \ | ||
-H "Api-Key: ${{ secrets.DISCUSS_KEY }}" \ | ||
-H "Api-Username: axonbot" \ | ||
-H 'Content-Type: application/json' \ | ||
--data-binary @- << EOF | ||
{ | ||
"title": "Axon Framework - Release ${{ github.event.release.name }}", | ||
"raw": "I’m glad to announce that we’ve released Axon Framework \n\n${{ github.event.release.name }}\n\n on \n\n${{ github.event.release.createdAt }}\n\n.<br\> | ||
This release contains: <br/> ${{ github.event.release.description}}", | ||
"category": $CATEGORY, | ||
"tags": ["release"] | ||
} | ||
EOF |