Skip to content

Commit

Permalink
Add release config for forum topic and discord thread
Browse files Browse the repository at this point in the history
  • Loading branch information
rockfactory committed Feb 17, 2024
1 parent 58a79ef commit 2bf2934
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Upload release

env:
SPACEDOCK_MOD_ID: 3560
SPACEDOCK_URL: https://spacedock.info/mod/3560/CommNext#changelog
DISCORD_THREAD_ID: "1208437501807566888"
DISCORD_AUTHOR: "CommNext"
DISCORD_AVATAR: "https://avatars.githubusercontent.com/u/98559431?s=200&v=4"
FORUM_URL: https://forum.kerbalspaceprogram.com/topic/223732-commnext-v050-for-ksp2-v021/
FORUM_TITLE: "CommNext [v{version} for KSP2 v{ksp2_version}]"

on:
release:
Expand Down Expand Up @@ -71,3 +77,36 @@ jobs:
version: ${{ env.version }}
zipball: ${{ env.zip }}
changelog: ./changelog.md

- name: Update mod topic
uses: Kerbalight/ksp2-forum-post-action@latest
with:
username: ${{ secrets.KSP_FORUM_USERNAME }}
password: ${{ secrets.KSP_FORUM_PASSWORD }}
forum_topic_url: ${{ env.FORUM_URL }}
forum_topic_title: ${{ env.FORUM_TITLE }}
spacedock_url: ${{ env.SPACEDOCK_URL }}
version: ${{ env.version }}
changelog: ./changelog.md

- name: Prepare content for discord
shell: bash
run: |
echo -e "## Release v${version}\n" > ./content.md
cat ./changelog.md >> ./content.md
{
echo 'discord_message<<EOF'
cat ./content.md
echo EOF
} >> "$GITHUB_ENV"
- name: Publish update to Discord
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_KMS_WEBHOOK_URL }}
content: ${{ env.discord_message }}
thread-id: ${{ env.DISCORD_THREAD_ID }}
username: ${{ env.DISCORD_AUTHOR }}
avatar-url: ${{ env.DISCORD_AVATAR }}


0 comments on commit 2bf2934

Please sign in to comment.