Skip to content

Commit

Permalink
Update release_nuget.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cheese3660 authored Jan 3, 2024
1 parent 982ef2d commit d13c440
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/release_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
echo "zip=$(ls -1 dist/SpaceWarp-*.zip | head -n 1)" >> $GITHUB_ENV
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
echo "changelog=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].body' | tr -d \" | jq -Rr @uri)" >> $GITHUB_ENV
echo "${{ env.changelog }}" > ./changelog.md
- name: Check if version exists
id: check-version
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
- name: Update mod on spacedock
run: |
result=$(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")
result=$(curl -b ./cookies -F "version=${{ env.version }}" -F "changelog=@./changelog.md" -F "game-version=${{ env.LATEST_GAME_VERSION }}" -F "notify-followers=yes" -F "zipball=@${{ env.zip }}" "https://spacedock.info/api/mod/${{ env.MOD_ID }}/update")
errored=$(echo $result | jq .error)
if [ "$errored" == "true" ]; then
echo "Upload to space dock errored: $(echo $result | jq .reason)"
Expand Down

0 comments on commit d13c440

Please sign in to comment.