diff --git a/.github/workflows/package_testing.yml b/.github/workflows/package_testing.yml index 7b2d9ec..809b146 100644 --- a/.github/workflows/package_testing.yml +++ b/.github/workflows/package_testing.yml @@ -24,7 +24,9 @@ jobs: sudo apt-get update sudo apt-get -y install libegl1-mesa - name: Install the latest version of rye - uses: eifinger/setup-rye@v1 + uses: eifinger/setup-rye@v4 + with: + version: 'latest' - name: Sync Rye run: | rye pin ${{ matrix.python-version }} diff --git a/.justfile b/.justfile index 5558154..f15d976 100644 --- a/.justfile +++ b/.justfile @@ -10,7 +10,7 @@ update_workflow minimum_version maximum_version: from pathlib import Path import sys - workflow = Path('.github/workflows/package_testing.yml') + workflows = [Path('.github/workflows/package_testing.yml'), Path('.github/workflows/release_on_pypi.yml')] vmin = sys.argv[1] vmax = sys.argv[2] @@ -18,22 +18,23 @@ update_workflow minimum_version maximum_version: minor_min = int(vmin.split(".")[1]) minor_max = int(vmax.split(".")[1]) - with open(workflow) as f: - content = f.readlines() - - for it, line in enumerate(content): - if "MAIN_PYTHON_VERSION: " in line: - print(it) - content[it] = f' MAIN_PYTHON_VERSION: "{vmax}"\n' - elif "python-version:" in line: - new_line = f' python-version: [' - for jt in range(minor_min, minor_max): - new_line += f'"3.{jt}", ' - new_line += f'"3.{minor_max}"]\n' - content[it] = new_line - - with open(workflow, 'w') as f: - f.writelines(content) + for workflow in workflows: + with open(workflow) as f: + content = f.readlines() + + for it, line in enumerate(content): + if "MAIN_PYTHON_VERSION: " in line: + print(it) + content[it] = f' MAIN_PYTHON_VERSION: "{vmax}"\n' + elif "python-version:" in line: + new_line = f' python-version: [' + for jt in range(minor_min, minor_max): + new_line += f'"3.{jt}", ' + new_line += f'"3.{minor_max}"]\n' + content[it] = new_line + + with open(workflow, 'w') as f: + f.writelines(content) [positional-arguments] python_update minimum_version maximum_version: