diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 13ffb74..b137afc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,5 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json - -name: Publish +name: Publish Module on: push: @@ -17,11 +16,11 @@ env: jobs: build-module: - name: Build for distribution + name: Build Module runs-on: ubuntu-latest steps: - name: Setup - uses: butr/actions-common-setup@v2.0 + uses: butr/actions-common-setup@v2.1 with: github-token: ${{secrets.GITHUB_TOKEN}} @@ -57,70 +56,65 @@ jobs: env: BANNERLORD_BUTR_UPLOAD_URL: ${{secrets.BANNERLORD_BUTR_UPLOAD_URL}} + - name: Install and Run ChangelogParser + id: changelog + run: | + dotnet tool install -g Bannerlord.ChangelogParser + vers="$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")" + echo "::set-output name=mod_version::$vers" + desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")" + desc="${desc//'%'/'%25'}" + desc="${desc//$'\n'/'%0A'}" + desc="${desc//$'\r'/'%0D'}" + echo "::set-output name=mod_description::$desc" + - name: Upload Bannerlord folder uses: actions/upload-artifact@v3 with: name: bannerlord path: ./bannerlord/ - - ########################### - # GITHUB # - ########################### - publish-on-github: - name: Publish on GitHub - runs-on: ubuntu-latest + +########################### +# NEXUSMODS # +########################### + publish-on-nexusmods: needs: ["build-module"] - steps: - - name: Setup - uses: butr/actions-common-setup@v2.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - - - name: Download bannerlord folder - uses: actions/download-artifact@v3 - with: - name: bannerlord - path: ./bannerlord - - - name: Zip Bannerlord.IronPython - run: 7z a -t7z Bannerlord.IronPython.7z ./bannerlord/* -mx9 - #shell: pwsh - # pwsh casues it to include the root folder - - - name: Install Bannerlord.ChangelogParser - run: >- - dotnet tool install -g Bannerlord.ChangelogParser; - shell: pwsh - - - name: Run ChangelogParser - id: changelog - run: | - vers="$(bannerlord_changelog_parser latestversion -f "$PWD/changelog.txt")" - echo "::set-output name=mod_version::$vers" - desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")" - desc="${desc//'%'/'%25'}" - desc="${desc//$'\n'/'%0A'}" - desc="${desc//$'\r'/'%0D'}" - echo "::set-output name=mod_description::$desc" - - name: Create Release - uses: actions/create-release@v1 - id: create_release - with: - tag_name: v${{steps.changelog.outputs.mod_version}} - release_name: Release ${{steps.changelog.outputs.mod_version}} - body: ${{steps.changelog.outputs.mod_description}} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + uses: BUTR/workflows/.github/workflows/release-nexusmods.yml@master + with: + nexusmods_game_id: mountandblade2bannerlord + nexusmods_mod_id: 4252 + mod_filename: IronPython + mod_version: ${{ needs.build-module.outputs.mod_version }} + mod_description: ${{ needs.build-module.outputs.mod_description }} + artifact_name: bannerlord + secrets: + NEXUSMODS_APIKEY: ${{ secrets.ARAGAS_NEXUSMODS_API_KEY }} + NEXUSMODS_COOKIES: ${{ secrets.ARAGAS_NEXUSMODS_COOKIE_SID_DEVELOP }} + +########################### +# STEAM # +########################### + publish-on-steam: + needs: ["build-module"] + uses: BUTR/workflows/.github/workflows/release-steam.yml@master + with: + workshop_id: 2859285207 + mod_id: Bannerlord.IronPython + mod_description: ${{ needs.build-module.outputs.mod_description }} + artifact_name: bannerlord + secrets: + STEAM_LOGIN: ${{ secrets.STEAM_WORKSHOP_LOGIN }} + STEAM_PASSWORD: ${{ secrets.STEAM_WORKSHOP_PASSWORD }} + STEAM_AUTH_CODE: ${{ secrets.STEAM_WORKSHOP_AUTH_CODE }} - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{steps.create_release.outputs.upload_url}} - asset_path: ./Bannerlord.IronPython.7z - asset_name: Bannerlord.IronPython.7z - asset_content_type: application/x-7z-compressed - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} +########################### +# GITHUB # +########################### + publish-on-github: + needs: ["build-module"] + uses: BUTR/workflows/.github/workflows/release-github.yml@master + with: + mod_id: Bannerlord.IronPython + mod_version: ${{ needs.build-module.outputs.mod_version }} + mod_description: ${{ needs.build-module.outputs.mod_description }} + artifact_name: bannerlord diff --git a/README.md b/README.md index 02a3691..adf215e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
- + CodeFactor diff --git a/build/common.props b/build/common.props index 9b7ee56..a57591f 100644 --- a/build/common.props +++ b/build/common.props @@ -4,17 +4,17 @@ 3.4.0 - $(IronPythonVersion).1 + $(IronPythonVersion).3 - 2.2.1 - 3.1.0.61 - 1.0.1.44 - 2.1.13 + 2.2.2 + 3.2.0.77 + 1.0.1.50 + 2.8.1 - 1.0.1.68 - 2.0.0.86 - 4.0.121 + 1.1.0.102 + 3.0.0.136 + 5.0.209 @@ -113,7 +113,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/changelog.txt b/changelog.txt index eec4cd8..c37e26e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,13 @@ --------------------------------------------------------------------------------------------------- +Version: 3.4.0.3 +Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.2.0 +* Updated to v1.2.0 +--------------------------------------------------------------------------------------------------- +Version: 3.4.0.2 +Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0 +* Adapted for Release +* Switched to Python v3.4.0 non beta +--------------------------------------------------------------------------------------------------- Version: 3.4.0.1 Game Versions: e1.7.2,e1.8.0 * Switched to a ButterLib architecture diff --git a/src/Bannerlord.IronPython.Implementation/BUTRLoadingInterceptor.cs b/src/Bannerlord.IronPython.Implementation/BLSELoadingInterceptor.cs similarity index 96% rename from src/Bannerlord.IronPython.Implementation/BUTRLoadingInterceptor.cs rename to src/Bannerlord.IronPython.Implementation/BLSELoadingInterceptor.cs index c86eb34..df6e1e1 100644 --- a/src/Bannerlord.IronPython.Implementation/BUTRLoadingInterceptor.cs +++ b/src/Bannerlord.IronPython.Implementation/BLSELoadingInterceptor.cs @@ -15,8 +15,8 @@ namespace Bannerlord.IronPython.Implementation { - [BUTRLoaderInterceptor] - public static class BUTRLoadingInterceptor + [BLSEInterceptor] + public static class BLSELoadingInterceptor { private static readonly AccessTools.FieldRef>? LoadedSubModuleTypes = AccessTools2.FieldRefAccess>("_loadedSubmoduleTypes"); diff --git a/src/Bannerlord.IronPython.Implementation/Bannerlord.IronPython.Implementation.csproj b/src/Bannerlord.IronPython.Implementation/Bannerlord.IronPython.Implementation.csproj index 5f1dfad..38de4c2 100644 --- a/src/Bannerlord.IronPython.Implementation/Bannerlord.IronPython.Implementation.csproj +++ b/src/Bannerlord.IronPython.Implementation/Bannerlord.IronPython.Implementation.csproj @@ -20,7 +20,7 @@ - + @@ -29,9 +29,9 @@ - - - + + + diff --git a/src/Bannerlord.IronPython.Implementation/_Module/SubModule.xml b/src/Bannerlord.IronPython.Implementation/_Module/SubModule.xml index c8b7f93..de9851a 100644 --- a/src/Bannerlord.IronPython.Implementation/_Module/SubModule.xml +++ b/src/Bannerlord.IronPython.Implementation/_Module/SubModule.xml @@ -4,16 +4,14 @@ - - - + - + @@ -31,11 +29,11 @@ - - - - - + + + + + diff --git a/src/Bannerlord.IronPython/BUTRLoadingInterceptor.cs b/src/Bannerlord.IronPython/BLSEInterceptor.cs similarity index 97% rename from src/Bannerlord.IronPython/BUTRLoadingInterceptor.cs rename to src/Bannerlord.IronPython/BLSEInterceptor.cs index 4c4874f..900f24c 100644 --- a/src/Bannerlord.IronPython/BUTRLoadingInterceptor.cs +++ b/src/Bannerlord.IronPython/BLSEInterceptor.cs @@ -11,14 +11,14 @@ namespace Bannerlord.IronPython { - [BUTRLoaderInterceptor] - public static class BUTRLoadingInterceptor + [BLSEInterceptor] + public static class BLSEInterceptor { private delegate void OnInitializeSubModulesPrefixDelegate(); private delegate void OnLoadSubModulesPostfixDelegate(); private static bool CheckType(Type type) => type.GetCustomAttributes() - .Any(att => string.Equals(att.GetType().FullName, typeof(BUTRLoaderInterceptorAttribute).FullName, StringComparison.Ordinal)); + .Any(att => string.Equals(att.GetType().FullName, typeof(BLSEInterceptorAttribute).FullName, StringComparison.Ordinal)); private static IEnumerable GetInterceptorTypes(Assembly assembly) { diff --git a/src/Bannerlord.IronPython/Bannerlord.IronPython.csproj b/src/Bannerlord.IronPython/Bannerlord.IronPython.csproj index a95682b..7f40e94 100644 --- a/src/Bannerlord.IronPython/Bannerlord.IronPython.csproj +++ b/src/Bannerlord.IronPython/Bannerlord.IronPython.csproj @@ -8,16 +8,16 @@ - + - - - + + + \ No newline at end of file diff --git a/src/Bannerlord.IronPython/Utils/BUTRLoaderInterceptorAttribute.cs b/src/Bannerlord.IronPython/Utils/BLSEInterceptorAttribute.cs similarity index 66% rename from src/Bannerlord.IronPython/Utils/BUTRLoaderInterceptorAttribute.cs rename to src/Bannerlord.IronPython/Utils/BLSEInterceptorAttribute.cs index 0067594..87e3fb5 100644 --- a/src/Bannerlord.IronPython/Utils/BUTRLoaderInterceptorAttribute.cs +++ b/src/Bannerlord.IronPython/Utils/BLSEInterceptorAttribute.cs @@ -4,5 +4,5 @@ namespace Bannerlord.BUTRLoader { [AttributeUsage(AttributeTargets.Class)] - public sealed class BUTRLoaderInterceptorAttribute : Attribute { } + public sealed class BLSEInterceptorAttribute : Attribute { } } \ No newline at end of file diff --git a/src/Bannerlord.IronPythonExample/Bannerlord.IronPythonExample.msbuildproj b/src/Bannerlord.IronPythonExample/Bannerlord.IronPythonExample.msbuildproj index ad86b41..fa9c4af 100644 --- a/src/Bannerlord.IronPythonExample/Bannerlord.IronPythonExample.msbuildproj +++ b/src/Bannerlord.IronPythonExample/Bannerlord.IronPythonExample.msbuildproj @@ -1,8 +1,8 @@ - + 3.4.0 - 0.0.1 + 0.0.2 net472 x64 $(MSBuildProjectName) @@ -21,4 +21,4 @@ - + \ No newline at end of file diff --git a/src/Bannerlord.IronPythonExample/_Module/SubModule.xml b/src/Bannerlord.IronPythonExample/_Module/SubModule.xml index 77889ed..b52fdd9 100644 --- a/src/Bannerlord.IronPythonExample/_Module/SubModule.xml +++ b/src/Bannerlord.IronPythonExample/_Module/SubModule.xml @@ -4,30 +4,27 @@ - - - + - - - - - + + + + + - - - - - - + + + + + @@ -38,4 +35,4 @@ - + \ No newline at end of file diff --git a/supported-game-versions.txt b/supported-game-versions.txt index dc15e0c..d4d7322 100644 --- a/supported-game-versions.txt +++ b/supported-game-versions.txt @@ -1,2 +1,11 @@ -e1.8.0 -e1.7.2 \ No newline at end of file +v1.2.0 +v1.1.5 +v1.1.4 +v1.1.3 +v1.1.2 +v1.1.1 +v1.1.0 +v1.0.3 +v1.0.2 +v1.0.1 +v1.0.0 \ No newline at end of file