-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (48 loc) · 1.43 KB
/
autoPublish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 mod_version
id: mod_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.mod_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