Update to 0.0.4 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto publish | |
on: | |
push: | |
paths: | |
- 'info.json' # Triggers only if the mod info file is updated | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: get version | |
id: version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: 'info.json' | |
prop_path: 'version' | |
- name: get factorio_version | |
id: factorio_version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: 'info.json' | |
prop_path: 'factorio_version' | |
- name: get mod name | |
id: mod_name | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: 'info.json' | |
prop_path: 'name' | |
- name: Zip mod | |
run: bash ./.scripts/zip_mod.sh | |
- name: Upload the mod on mods.factorio.com | |
env: | |
FACTORIO_MOD_API_KEY: ${{ secrets.FACTORIO_MOD_API_KEY }} | |
run: bash ./.scripts/upload.sh | |
- uses: marvinpinto/action-automatic-releases@latest | |
id: aar | |
with: | |
automatic_release_tag: "${{steps.version.outputs.prop}}" | |
title: "For factorio ${{steps.factorio_version.outputs.prop}}" | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
./${{steps.mod_name.outputs.prop}}_${{steps.version.outputs.prop}}.zip |