Skip to content

Commit

Permalink
Merge pull request #2256 from AxonFramework/release-notification-discuss
Browse files Browse the repository at this point in the history
Release announcement on discuss
  • Loading branch information
smcvb committed Jun 17, 2022
2 parents 6f91622 + 791b5d5 commit ad81d0a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/discuss-notification.yml
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

0 comments on commit ad81d0a

Please sign in to comment.