File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish NuGet and upload release
2-
2+ env :
3+ MOD_ID : 3482
4+ LATEST_GAME_VERSION : 0.2.0
5+
36on :
47 release :
58 types : [ "published" ]
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
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+
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments