From 0f087cd4ae08d535bc8a8ccc8a2365e84914cc44 Mon Sep 17 00:00:00 2001 From: Marcus G K Williams <168222+mgkwill@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:08:11 -0700 Subject: [PATCH] Update action.yml --- action.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/action.yml b/action.yml index ea076a5..1e812db 100644 --- a/action.yml +++ b/action.yml @@ -19,7 +19,13 @@ runs: steps: - name: Install Poetry run: | - python3 -m pip install --user pipx + if [ "$RUNNER_OS" == "Linux" ]; then + python3 -m pip install --user pipx + elif [ "$RUNNER_OS" == "Windows" ]; then + python3 -m pip install --user pipx + elif [ "$RUNNER_OS" == "macOS" ]; then + brew install pipx + fi python3 -m pipx ensurepath python3 -m pipx install poetry==${{ inputs.poetry_ver }} shell: bash @@ -34,20 +40,21 @@ runs: **/pyproject.toml - name: Install Poetry w/ updated python version (Linux) - run: | - python${{ inputs.python_ver }} -m pip install --user pipx - python${{ inputs.python_ver }} -m pipx ensurepath - python${{ inputs.python_ver }} -m pipx install poetry==${{ inputs.poetry_ver }} - shell: bash - if: runner.os == 'Linux' - - - name: Install Poetry w/ updated python version (Windows) - run: | - python -m pip install --user pipx - python -m pipx ensurepath - python -m pipx install poetry==${{ inputs.poetry_ver }} + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + python${{ inputs.python_ver }} -m pip install --user pipx + python${{ inputs.python_ver }} -m pipx ensurepath + python${{ inputs.python_ver }} -m pipx install poetry==${{ inputs.poetry_ver }} + elif [ "$RUNNER_OS" == "Windows" ]; then + python -m pip install --user pipx + python -m pipx ensurepath + python -m pipx install poetry==${{ inputs.poetry_ver }} + elif [ "$RUNNER_OS" == "macOS" ]; then + python${{ inputs.python_ver }} -m pip install --user pipx + python${{ inputs.python_ver }} -m pipx ensurepath + python${{ inputs.python_ver }} -m pipx install poetry==${{ inputs.poetry_ver }} + fi shell: bash - if: runner.os == 'Windows' - name: Load cached venv id: cached-poetry-dependencies