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

ci: Fix #14

Merged
merged 2 commits into from
Sep 27, 2024
Merged
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
21 changes: 15 additions & 6 deletions .github/actions/build-modpack/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,27 @@ runs:
sudo chmod +x /usr/bin/packwiz
shell: bash

- name: Install yq and jq
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install jq and yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
sudo apt install -y jq
pip install yq
shell: bash

- name: Set version fields
run: |
tomlq -t '.version = "${{ inputs.version }}"' pack.toml > pack.toml.tmp && mv pack.toml.tmp pack.toml
jq '.overrides.minecraft["+recommends"].iotomr = ">${{ inputs.version }}"' config/fabric_loader_dependencies.json > fld.json.tmp && mv fld.json.tmp config/fabric_loader_dependencies.json
jq '.main_menu.bottom_right[0].text |= sub("{{PACK_VERSION}}"; "${{ inputs.version }}")' config/isxander-main-menu-credits.json > mmc.json.tmp && mv mmc.json.tmp config/isxander-main-menu-credits.json
tomlq -t '.version = "${{ inputs.version }}"' pack.toml > pack.toml.tmp
mv pack.toml.tmp pack.toml

jq '.overrides.minecraft["+recommends"].iotomr = ">${{ inputs.version }}"' config/fabric_loader_dependencies.json > fld.json.tmp
mv fld.json.tmp config/fabric_loader_dependencies.json

jq '.main_menu.bottom_right[0].text |= sub("{{PACK_VERSION}}"; "${{ inputs.version }}")' config/isxander-main-menu-credits.json > mmc.json.tmp
mv mmc.json.tmp config/isxander-main-menu-credits.json
shell: bash
working-directory: ${{ inputs.edition }}

Expand Down