Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.2 #21

Merged
merged 8 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 22 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Upload release

env:
MOD_ID: 3484
KSP2_ID: 22407
SPACEDOCK_MOD_ID: 3484

on:
release:
Expand All @@ -14,26 +14,29 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Download NuGet
id: download-nuget
run: |
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
run: sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

- name: Install jq
uses: dcarbone/[email protected]

- name: Build the solution
run: dotnet build "CommunityResources.sln" -c Release

- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
dotnet build "CommunityResources.sln" -c Release
echo "release_filename=CommunityResources-$version.zip" >> $GITHUB_ENV
echo "zip=$(ls -1 dist/CommunityResources-*.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 \")" >> $GITHUB_ENV
echo "${{ env.changelog }}" > ./changelog.md
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md

- name: Upload zip to release
uses: shogo82148/[email protected]
Expand All @@ -44,32 +47,17 @@ jobs:
asset_path: ${{ env.zip }}
asset_name: ${{ env.release_filename }}
asset_content_type: application/zip

- name: Add Mask
run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"

- name: Log in to spacedock
run: |
login_response=$(curl -F username=${{ secrets.SPACEDOCK_USER }} -F password=${{ secrets.SPACEDOCK_PASSWORD }} -c ./cookies "https://spacedock.info/api/login")
login_errored=$(echo $login_response | jq .error)
if [ "$login_errored" == "true" ]; then
echo "Login to space dock errored: $(echo $login_response | jq .reason)"
exit 1
else
echo "Login to space dock successful"
fi

- name: Query latest game version
run: |
echo "LATEST_GAME_VERSION=$(curl 'https://spacedock.info/api/${{ env.KSP2_ID }}/versions' | jq '.[0].friendly_version' | tr -d \")" >> $GITHUB_ENV

- name: Update mod on spacedock
run: |
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)"
exit 1
else
echo "Upload to space dock successful"
fi

- name: Update mod on SpaceDock
uses: KSP2Community/[email protected]
with:
username: ${{ secrets.SPACEDOCK_USER }}
password: ${{ secrets.SPACEDOCK_PASSWORD }}
game_id: 22407
mod_id: ${{ env.SPACEDOCK_MOD_ID }}
version: ${{ env.version }}
zipball: ${{ env.zip }}
changelog: ./changelog.md

This file was deleted.

2 changes: 0 additions & 2 deletions Unity/ProjectSettings/ProjectVersion.txt

This file was deleted.

2 changes: 1 addition & 1 deletion plugin_template/addressables/AddressablesLink/link.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Texture2D" preserve="all" />
<type fullname="UnityEngine.Sprite" preserve="all" />
<type fullname="UnityEngine.Texture2D" preserve="all" />
</assembly>
</linker>
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin_template/addressables/catalog.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"m_LocatorId":"AddressablesMainContentCatalog","m_InstanceProviderData":{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider"},"m_Data":""},"m_SceneProviderData":{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.SceneProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.SceneProvider"},"m_Data":""},"m_ResourceProviderData":[{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider"},"m_Data":""},{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"},"m_Data":""},{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"},"m_Data":""}],"m_ProviderIds":["UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider","UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"],"m_InternalIds":["{SpaceWarpPaths.CommunityResources}\\addressables\\StandaloneWindows64\\defaultlocalgroup_assets_all_ea3e451b5dc39c7ec9b3b86c3ec27c6a.bundle","Assets/CR_ICO_Food.png","Assets/CR_ICO_Oxygen.png","Assets/CR_ICO_Water.png"],"m_KeyDataString":"CAAAAABEAAAAZGVmYXVsdGxvY2FsZ3JvdXBfYXNzZXRzX2FsbF9lYTNlNDUxYjVkYzM5YzdlYzliM2I4NmMzZWMyN2M2YS5idW5kbGUAFgAAAEFzc2V0cy9DUl9JQ09fRm9vZC5wbmcAIAAAADY5MTUxY2Y4MmQ5NzhiMTQ4OWExYTY2MGE5ODU5MGM5AAkAAAB1aV9zcHJpdGUAGAAAAEFzc2V0cy9DUl9JQ09fT3h5Z2VuLnBuZwAgAAAANjMwMjkwOTJkMjY5NzNkNDY5YzgxYmU0OTA4OWY3YmUAFwAAAEFzc2V0cy9DUl9JQ09fV2F0ZXIucG5nACAAAABlYjE4NzFmZmQwZjNkN2M0NmFjZmQyODM2MWFiZWQ0Yg==","m_BucketDataString":"CAAAAAQAAAABAAAAAAAAAE0AAAACAAAAAQAAAAIAAABoAAAAAgAAAAEAAAACAAAAjQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAACbAAAAAgAAAAMAAAAEAAAAuAAAAAIAAAADAAAABAAAAN0AAAACAAAABQAAAAYAAAD5AAAAAgAAAAUAAAAGAAAA","m_EntryDataString":"BwAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAADzAUaD/////wEAAAABAAAAAQAAAAEAAAAAAAAA8wFGg/////8BAAAAAgAAAAIAAAABAAAAAAAAAPMBRoP/////BAAAAAEAAAACAAAAAQAAAAAAAADzAUaD/////wQAAAACAAAAAwAAAAEAAAAAAAAA8wFGg/////8GAAAAAQAAAAMAAAABAAAAAAAAAPMBRo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G4AcwBXAGgAZQBuAEwAbwBhAGQAZQBkACIAOgBmAGEAbABzAGUAfQA=","m_resourceTypes":[{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource"},{"m_AssemblyName":"UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.Texture2D"},{"m_AssemblyName":"UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.Sprite"}],"m_InternalIdPrefixes":[]}
{"m_LocatorId":"AddressablesMainContentCatalog","m_BuildResultHash":"dec71fea942764e18e3b433b420d7933","m_InstanceProviderData":{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider"},"m_Data":""},"m_SceneProviderData":{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.SceneProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.SceneProvider"},"m_Data":""},"m_ResourceProviderData":[{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider"},"m_Data":""},{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"},"m_Data":""},{"m_Id":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider","m_ObjectType":{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"},"m_Data":""}],"m_ProviderIds":["UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider","UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider"],"m_InternalIds":["{SpaceWarpPaths.CommunityResources}\\addressables\\StandaloneWindows64\\communityresources_assets_all_68156aa968b13548006aa784a6601227.bundle","Assets/Resource Icons/CR_ICO_Food.png","Assets/Resource Icons/CR_ICO_Oxygen.png","Assets/Resource Icons/CR_ICO_Water.png"],"m_KeyDataString":"CAAAAABFAAAAY29tbXVuaXR5cmVzb3VyY2VzX2Fzc2V0c19hbGxfNjgxNTZhYTk2OGIxMzU0ODAwNmFhNzg0YTY2MDEyMjcuYnVuZGxlAA8AAABDUl9JQ09fRm9vZC5wbmcAIAAAAGI4ZDkxZGM4NzBiNmIyNDQ3OGUzYjA3OGUwODI1YTljAAkAAAB1aV9zcHJpdGUAEQAAAENSX0lDT19PeHlnZW4ucG5nACAAAABlODQzZDJkM2IyYjFhZTY0NGJjZDdjOGNjMWFhYzk5MwAQAAAAQ1JfSUNPX1dhdGVyLnBuZwAgAAAAODY5NmI4Y2I0YzY1Yjk1NGE4NjAyMmZmMmRmYTZlMDA=","m_BucketDataString":"CAAAAAQAAAABAAAAAAAAAE4AAAACAAAAAQAAAAIAAABiAAAAAgAAAAEAAAACAAAAhwAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAACVAAAAAgAAAAMAAAAEAAAAqwAAAAIAAAADAAAABAAAANAAAAACAAAABQAAAAYAAADlAAAAAgAAAAUAAAAGAAAA","m_EntryDataString":"BwAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAABVVjQe/////wEAAAABAAAAAQAAAAEAAAAAAA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BfAFUAcwBlAFUAVwBSAEYAbwByAEwAbwBjAGEAbABCAHUAbgBkAGwAZQBzACIAOgBmAGEAbABzAGUALAAiAG0AXwBDAGwAZQBhAHIATwB0AGgAZQByAEMAYQBjAGgAZQBkAFYAZQByAHMAaQBvAG4AcwBXAGgAZQBuAEwAbwBhAGQAZQBkACIAOgBmAGEAbABzAGUAfQA=","m_resourceTypes":[{"m_AssemblyName":"Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.ResourceManagement.ResourceProviders.IAssetBundleResource"},{"m_AssemblyName":"UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.Texture2D"},{"m_AssemblyName":"UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.Sprite"}],"m_InternalIdPrefixes":[]}
2 changes: 1 addition & 1 deletion plugin_template/addressables/settings.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"m_buildTarget":"StandaloneWindows64","m_SettingsHash":"","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"},"SerializedData":[]}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_IsLocalCatalogInBundle":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""},"m_AddressablesVersion":"1.18.19","m_maxConcurrentWebRequests":500,"m_CatalogRequestsTimeout":0}
{"m_buildTarget":"StandaloneWindows64","m_SettingsHash":"1180c37427ee7b87d3329b4c4ddd63d1","m_CatalogLocations":[{"m_Keys":["AddressablesMainContentCatalog"],"m_InternalId":"{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog.json","m_Provider":"UnityEngine.AddressableAssets.ResourceProviders.ContentCatalogProvider","m_Dependencies":[],"m_ResourceType":{"m_AssemblyName":"Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_ClassName":"UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData"},"SerializedData":[7,76,85,110,105,116,121,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,114,44,32,86,101,114,115,105,111,110,61,48,46,48,46,48,46,48,44,32,67,117,108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,110,117,108,108,75,85,110,105,116,121,69,110,103,105,110,101,46,82,101,115,111,117,114,99,101,77,97,110,97,103,101,109,101,110,116,46,82,101,115,111,117,114,99,101,80,114,111,118,105,100,101,114,115,46,80,114,111,118,105,100,101,114,76,111,97,100,82,101,113,117,101,115,116,79,112,116,105,111,110,115,50,0,0,0,123,0,34,0,109,0,95,0,73,0,103,0,110,0,111,0,114,0,101,0,70,0,97,0,105,0,108,0,117,0,114,0,101,0,115,0,34,0,58,0,116,0,114,0,117,0,101,0,125,0]}],"m_ProfileEvents":false,"m_LogResourceManagerExceptions":true,"m_ExtraInitializationData":[],"m_DisableCatalogUpdateOnStart":false,"m_IsLocalCatalogInBundle":false,"m_CertificateHandlerType":{"m_AssemblyName":"","m_ClassName":""},"m_AddressablesVersion":"1.21.20","m_maxConcurrentWebRequests":3,"m_CatalogRequestsTimeout":0}
42 changes: 0 additions & 42 deletions plugin_template/localizations/english.csv

This file was deleted.

42 changes: 0 additions & 42 deletions plugin_template/localizations/french.csv

This file was deleted.

Loading
Loading