@@ -10,6 +10,9 @@ inputs:
1010 compiler-version-password :
1111 description : ' The password for the compiler-version library'
1212 required : true
13+ utils-password :
14+ description : ' The password for the utils library'
15+ required : true
1316 zlib-password :
1417 description : ' The password for the zlib library'
1518 required : true
@@ -19,9 +22,6 @@ inputs:
1922 core-password :
2023 description : ' The password for the core library'
2124 required : true
22- utils-password :
23- description : ' The password for the utils library'
24- required : true
2525 rest-token :
2626 description : ' The Github authentication token to use to access the REST API.'
2727 required : true
4646 exit 1
4747 fi
4848
49+ if [ -z "${{ inputs.utils-password }}" ]; then
50+ echo "utils-password is empty"
51+ exit 1
52+ fi
53+
4954 if [ -z "${{ inputs.zlib-password }}" ]; then
5055 echo "zlib-password is empty"
5156 exit 1
@@ -55,23 +60,18 @@ runs:
5560 echo "nbt-password is empty"
5661 exit 1
5762 fi
58-
63+
5964 if [ -z "${{ inputs.core-password }}" ]; then
6065 echo "core-password is empty"
6166 exit 1
6267 fi
63-
64- if [ -z "${{ inputs.utils-password }}" ]; then
65- echo "utils-password is empty"
66- exit 1
67- fi
6868
6969 if [ -z "${{ inputs.rest-token }}" ]; then
7070 echo "rest-token is empty"
7171 exit 1
7272 fi
7373
74- - name : Set up Python ${{ inputs.python-version }}
74+ - name : Set up Python
7575 uses : actions/setup-python@v5
7676 with :
7777 python-version : ${{ inputs.python-version }}
@@ -101,32 +101,59 @@ runs:
101101 env :
102102 REST_TOKEN : ${{ inputs.rest-token }}
103103 run : |
104- python -c "import sys; sys.path.append(r'${{ github.action_path }}'); import dependency_resolver; import requirements; dependency_resolver.find_and_save_compatible_libraries([('amulet-utils', 'Amulet-Team/Amulet-Utils'), ('amulet-core', 'Amulet-Team/Amulet-Core'), ('amulet-nbt', 'Amulet-Team/Amulet-NBT'), ('amulet-zlib', 'Amulet-Team/Amulet-zlib')], requirements.get_runtime_dependencies())"
104+ python -c "import sys; sys.path.append(r'${{ github.action_path }}'); import dependency_resolver; import requirements; dependency_resolver.find_and_save_compatible_libraries([('amulet-core', 'Amulet-Team/Amulet-Core'), ('amulet-nbt', 'Amulet-Team/Amulet-NBT'), ('amulet-zlib', 'Amulet-Team/Amulet-zlib'), ('amulet-utils', 'Amulet-Team/Amulet-Utils')], requirements.get_runtime_dependencies())"
105+ pybind11=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['pybind11'])")
106+ echo "pybind11=$pybind11" >> "$GITHUB_OUTPUT"
107+ pybind11_extensions=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-pybind11-extensions'])")
108+ echo "pybind11_extensions=$pybind11_extensions" >> "$GITHUB_OUTPUT"
105109 io=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-io'])")
106110 echo "io=$io" >> "$GITHUB_OUTPUT"
111+ utils=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-utils'])")
112+ echo "utils=$utils" >> "$GITHUB_OUTPUT"
107113 zlib=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-zlib'])")
108114 echo "zlib=$zlib" >> "$GITHUB_OUTPUT"
109115 nbt=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-nbt'])")
110116 echo "nbt=$nbt" >> "$GITHUB_OUTPUT"
111117 core=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-core'])")
112118 echo "core=$core" >> "$GITHUB_OUTPUT"
113- utils=$(python -c "import os; f = open(os.path.join(r'${{ github.action_path }}', 'libraries.json'), encoding='utf-8'); import json; print(json.load(f)['amulet-utils'])")
114- echo "utils=$utils" >> "$GITHUB_OUTPUT"
115119
116120 - name : Specialise Specifiers
117121 id : dep2
118122 shell : bash
119123 run : |
124+ pybind11=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.pybind11 }}'))")
125+ echo "pybind11=$pybind11" >> "$GITHUB_OUTPUT"
126+ pybind11_extensions=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.pybind11_extensions }}'))")
127+ echo "pybind11_extensions=$pybind11_extensions" >> "$GITHUB_OUTPUT"
120128 io=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.io }}'))")
121129 echo "io=$io" >> "$GITHUB_OUTPUT"
130+ utils=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.utils }}'))")
131+ echo "utils=$utils" >> "$GITHUB_OUTPUT"
122132 zlib=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.zlib }}'))")
123133 echo "zlib=$zlib" >> "$GITHUB_OUTPUT"
124134 nbt=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.nbt }}'))")
125135 echo "nbt=$nbt" >> "$GITHUB_OUTPUT"
126136 core=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.core }}'))")
127137 echo "core=$core" >> "$GITHUB_OUTPUT"
128- utils=$(python -c "import requirements; print(requirements.get_specifier_set('${{ steps.dep.outputs.utils }}'))")
129- echo "utils=$utils" >> "$GITHUB_OUTPUT"
138+
139+
140+ - name : Clone Amulet-Utils
141+ uses : Amulet-Team/checkout-pep440@v1
142+ with :
143+ repository : ' Amulet-Team/Amulet-Utils'
144+ specifier : ' ==${{ steps.dep.outputs.utils }}'
145+ path : ' build/pylib/Amulet-Utils'
146+ rest-token : ${{ inputs.rest-token }}
147+
148+ - name : Install Amulet-Utils
149+ uses : ./build/pylib/Amulet-Utils/.github/actions/install
150+ with :
151+ twine-username : ${{ inputs.username }}
152+ twine-password : ${{ inputs.utils-password }}
153+ compiler-specifier : ' ==${{ steps.compiler.outputs.version }}'
154+ pybind11-specifier : ${{ steps.dep2.outputs.pybind11 }}
155+ pybind11-extensions-specifier : ${{ steps.dep2.outputs.pybind11_extensions }}
156+ utils-specifier : ${{ steps.dep2.outputs.utils }}
130157
131158 - name : Clone Amulet-zlib
132159 uses : Amulet-Team/checkout-pep440@v1
@@ -142,6 +169,8 @@ runs:
142169 twine-username : ${{ inputs.username }}
143170 twine-password : ${{ inputs.zlib-password }}
144171 compiler-specifier : ' ==${{ steps.compiler.outputs.version }}'
172+ pybind11-specifier : ${{ steps.dep2.outputs.pybind11 }}
173+ pybind11-extensions-specifier : ${{ steps.dep2.outputs.pybind11_extensions }}
145174 zlib-specifier : ${{ steps.dep2.outputs.zlib }}
146175
147176 - name : Clone Amulet-NBT
@@ -158,6 +187,8 @@ runs:
158187 twine-username : ${{ inputs.username }}
159188 twine-password : ${{ inputs.nbt-password }}
160189 compiler-specifier : ' ==${{ steps.compiler.outputs.version }}'
190+ pybind11-specifier : ${{ steps.dep2.outputs.pybind11 }}
191+ pybind11-extensions-specifier : ${{ steps.dep2.outputs.pybind11_extensions }}
161192 io-specifier : ${{ steps.dep2.outputs.io }}
162193 zlib-specifier : ${{ steps.dep2.outputs.zlib }}
163194 nbt-specifier : ${{ steps.dep2.outputs.nbt }}
@@ -176,22 +207,10 @@ runs:
176207 twine-username : ${{ inputs.username }}
177208 twine-password : ${{ inputs.core-password }}
178209 compiler-specifier : ' ==${{ steps.compiler.outputs.version }}'
210+ pybind11-specifier : ${{ steps.dep2.outputs.pybind11 }}
211+ pybind11-extensions-specifier : ${{ steps.dep2.outputs.pybind11_extensions }}
179212 io-specifier : ${{ steps.dep2.outputs.io }}
213+ zlib-specifier : ${{ steps.dep2.outputs.zlib }}
180214 nbt-specifier : ${{ steps.dep2.outputs.nbt }}
181215 core-specifier : ${{ steps.dep2.outputs.core }}
182216
183- - name : Clone Amulet-Utils
184- uses : Amulet-Team/checkout-pep440@v1
185- with :
186- repository : ' Amulet-Team/Amulet-Utils'
187- specifier : ' ==${{ steps.dep.outputs.utils }}'
188- path : ' build/pylib/Amulet-Utils'
189- rest-token : ${{ inputs.rest-token }}
190-
191- - name : Install Amulet-Utils
192- uses : ./build/pylib/Amulet-Utils/.github/actions/install
193- with :
194- twine-username : ${{ inputs.username }}
195- twine-password : ${{ inputs.utils-password }}
196- compiler-specifier : ' ==${{ steps.compiler.outputs.version }}'
197- utils-specifier : ${{ steps.dep2.outputs.utils }}
0 commit comments