Skip to content

Commit

Permalink
Release announcement on discuss
Browse files Browse the repository at this point in the history
  • Loading branch information
YvonneCeelie committed Jun 16, 2022
1 parent e237fa3 commit 09ffa40
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
File renamed without changes.
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 09ffa40

Please sign in to comment.