diff --git a/.github/workflows/autoPublish.yml b/.github/workflows/autoPublish.yml index c386fed..64342c3 100644 --- a/.github/workflows/autoPublish.yml +++ b/.github/workflows/autoPublish.yml @@ -33,6 +33,8 @@ jobs: with: path: 'info.json' prop_path: 'name' + - name: Zip mod + run: bash ./.scripts/zip_mod.sh - uses: marvinpinto/action-automatic-releases@latest id: aar with: @@ -40,17 +42,12 @@ jobs: title: "For factorio ${{steps.factorio_version.outputs.prop}}" repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - - name: Download the file - uses: suisei-cn/actions-download-file@v1 - id: downloadfile # Remember to give an ID if you need the output - with: - url: https://github.com/${{github.repository}}/archive/refs/tags/${{steps.aar.outputs.automatic_releases_tag}}.zip - target: temp/ - - run: cd temp && mv ${{steps.aar.outputs.automatic_releases_tag}}.zip ${{steps.mod_name.outputs.prop}}_${{steps.aar.outputs.automatic_releases_tag}}.zip + files: | + ./${{steps.mod_name.outputs.prop}}_${{steps.version.outputs.prop}}.zip - uses: TGNThump/factorio-publish-mod-action@v1 with: mod_portal_username: ${{ secrets.FACTORIO_USER }} mod_portal_password: ${{ secrets.FACTORIO_PASSWORD }} mod_name: ${{steps.mod_name.outputs.prop}} - asset_path: ./temp/${{steps.mod_name.outputs.prop}}_${{steps.aar.outputs.automatic_releases_tag}}.zip - asset_name: ${{steps.aar.outputs.automatic_releases_tag}} \ No newline at end of file + asset_path: ./${{steps.mod_name.outputs.prop}}_${{steps.version.outputs.prop}}.zip + asset_name: ${{steps.mod_name.outputs.prop}}_${{steps.version.outputs.prop}}.zip \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 45f86b6..551dc25 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,8 @@ -on: push +on: + push: + branches: + - main + name: Lint jobs: lint: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 8c7825b..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: push -name: Publish -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout repository and submodules - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Publish Mod - uses: shanemadden/factorio-mod-portal-publish@stable - env: - FACTORIO_PASSWORD: ${{ secrets.FACTORIO_PASSWORD }} - FACTORIO_USER: ${{ secrets.FACTORIO_USER }} diff --git a/LICENSE b/LICENSE index 0d0926e..70bd6e2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2019 Luke Perkin (https://github.com/perky) -Copyright (c) 2019-2021 ZwerOxotnik (https://github.com/ZwerOxotnik) +Copyright (c) 2019-2022 ZwerOxotnik (https://github.com/ZwerOxotnik) Copyright (c) 2020 pliesveld (https://github.com/pliesveld) Attribution 4.0 International diff --git a/changelog.txt b/changelog.txt index 5bf908e..d4c363c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.11.2 +Date: 2022-09-24 + Bugfixes: + - Fixed possible crush due to incorrect law deletion (https://mods.factorio.com/mod/m-lawful-evil/discussion/632f0aa787e8c9054a0cfef6) +--------------------------------------------------------------------------------------------------- Version: 0.11.1 Date: 2021-12-22 Changes: diff --git a/control.lua b/control.lua index 8b06e02..34ab6fc 100644 --- a/control.lua +++ b/control.lua @@ -1569,7 +1569,7 @@ function RevokeLaw(law, index) script.raise_event(module.self_events.on_pre_revoke_law, {law_id = law_id}) table.remove(global.laws, index) local laws = global.laws - for i=1, #laws do + for i=#laws, 1, -1 do other_law = laws[i] if other_law.linked_law == law_id then RevokeLaw(other_law, i) diff --git a/info.json b/info.json index 48cbeaf..76c6ce6 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "m-lawful-evil", - "version": "0.11.1", + "version": "0.11.2", "factorio_version": "1.1", "title": "Lawful Evil", "author": "Luke Perkin",