-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release config for forum topic and discord thread
- Loading branch information
1 parent
58a79ef
commit 2bf2934
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 }} | ||
|
||
|