-
Notifications
You must be signed in to change notification settings - Fork 110
36 lines (31 loc) · 1.13 KB
/
release-announcement.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: SourceForge Release Announcement
on:
release:
types: [published]
push:
branches:
- mwithi-release-news-sf
jobs:
post-release-announcement:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
- name: Set Default Release Variables
id: set-vars
run: |
echo "RELEASE_NAME=${{ github.event.release.name || 'Test' }}" >> $GITHUB_ENV
echo "RELEASE_BODY=${{ github.event.release.body || 'Empty body' }}" >> $GITHUB_ENV
- name: Create Release Announcement on SourceForge
env:
SOURCEFORGE_BEARER: ${{ secrets.SOURCEFORGE_BEARER }}
RELEASE_NAME: ${{ env.RELEASE_NAME }}
RELEASE_BODY: ${{ env.RELEASE_BODY }}
run: |
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer $SOURCEFORGE_BEARER" \
-d "labels=release" \
-d "state=draft" \
-d "text=$RELEASE_BODY" \
-d "title=$RELEASE_NAME" \
"https://sourceforge.net/rest/p/openhospital/blog"