-
Notifications
You must be signed in to change notification settings - Fork 38
39 lines (33 loc) · 1.33 KB
/
forum_update.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
37
38
39
name: Update Forum Topic
env:
FORUM_URL: 'https://forum.kerbalspaceprogram.com/topic/218490-space-warp-v190-for-ksp2-0200/'
FORUM_TITLE: 'Space Warp [v{version} for KSP2 {ksp2_version}]'
on:
workflow_dispatch:
jobs:
update_topic:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install jq
uses: dcarbone/[email protected]
- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md
- name: Update mod topic
uses: Kerbalight/ksp2-forum-post-action@latest
with:
username: ${{ secrets.FORUM_USER }}
password: ${{ secrets.FORUM_PASSWORD }}
forum_topic_url: ${{ env.FORUM_URL }}
forum_topic_title: ${{ env.FORUM_TITLE }}
spacedock_url: https://spacedock.info/mod/3277/Space%20Warp%20+%20BepInEx
version: ${{ env.version }}
swinfo_path: 'plugin_template/BepInEx/plugins/SpaceWarp/swinfo.json'
changelog: ./changelog.md