Skip to content

Commit 3702eb4

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents c9c4ddc + 0ce603e commit 3702eb4

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/on-release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Publish NuGet and upload release
2-
2+
env:
3+
MOD_ID: 3482
4+
LATEST_GAME_VERSION: 0.2.0
5+
36
on:
47
release:
58
types: [ "published" ]
@@ -32,6 +35,7 @@ jobs:
3235
echo "artifact_name=PatchManager-$version.zip" >> $GITHUB_ENV
3336
echo "zip=$(ls -1 dist/PatchManager-*.zip | head -n 1)" >> $GITHUB_ENV
3437
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
38+
echo "changelog=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].body' | tr -d \")" >> $GITHUB_ENV
3539
3640
- name: Check if version exists
3741
id: check-version
@@ -63,3 +67,18 @@ jobs:
6367
asset_name: ${{ env.artifact_name }}
6468
asset_content_type: application/zip
6569

70+
- name: Log in to spacedock
71+
run: |
72+
login_response=$(curl -F username=${{ secrets.SPACEDOCK_USER }} -F password=${{ secrets.SPACEDOCK_PASSWORD }} -c ./cookies "https://spacedock.info/api/login")
73+
login_errored=$(echo $login_response | jq .error)
74+
if [ "$login_errored" = "true" ]; then
75+
echo "Login to space dock errored: $(echo $login_response | jq .reason)"
76+
exit 1
77+
else
78+
echo "Login to space dock successful"
79+
fi
80+
81+
- name: Update mod on spacedock
82+
run: |
83+
curl -b ./cookies -F "version=${{ env.version }}" -F "changelog=${{ env.changelog }}" -F "game-version=${{ env.LATEST_GAME_VERSION}}" -F "notify-followers=yes" -F "zipball=@${{ env.zip }}" "https://spacedock.info/api/mod/${{ env.MOD_ID }}/update"
84+

plugin_template/swinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Patch Manager",
66
"description": "A mod for generic patching needs similar to KSP 1's Module Manager.",
77
"source": "https://github.com/KSP2Community/PatchManager",
8-
"version": "0.7.3",
8+
"version": "0.8.0",
99
"version_check": "https://raw.githubusercontent.com/KSP2Community/PatchManager/main/plugin_template/swinfo.json",
1010
"ksp2_version": {
1111
"min": "0.2.0",

0 commit comments

Comments
 (0)