Skip to content

Commit

Permalink
Update API curl for SF
Browse files Browse the repository at this point in the history
  • Loading branch information
mwithi authored Jul 23, 2024
1 parent 910ee9d commit 138dae4
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/release-announcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ jobs:

- name: Create Release Announcement on SourceForge
env:
SOURCEFORGE_TOKEN: ${{ secrets.SOURCEFORGE_TOKEN }}
SOURCEFORGE_USERNAME: ${{ secrets.SOURCEFORGE_USERNAME }}
SOURCEFORGE_BEARER: ${{ secrets.SOURCEFORGE_BEARER }}
GITHUB_REPOSITORY: ${{ github.repository }}
RELEASE_NAME: ${{ github.event.release.name }}
RELEASE_BODY: ${{ github.event.release.body }}
run: |
curl -X POST -H "Authorization: token $SOURCEFORGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "'"${RELEASE_NAME}"'",
"description": "'"${RELEASE_BODY}"'",
"author": "'"${SOURCEFORGE_USERNAME}"'"
}' \
"https://sourceforge.net/p/openhospital/news/new"
curl --location 'https://sourceforge.net/rest/p/openhospital/blog' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer $SOURCEFORGE_BEARER' \
--data-urlencode 'labels=release' \
--data-urlencode 'state=draft' \
--data-urlencode 'text=$RELEASE_BODY' \
--data-urlencode 'title=$RELEASE_NAME'

0 comments on commit 138dae4

Please sign in to comment.