Skip to content

Commit

Permalink
Update github script so that poetry actually installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Jul 1, 2024
1 parent cee9353 commit 50f94ef
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
tags:
- release.**

env:
PYTHON_VERSION: "3.9"
POETRY_VERSION: "1.8.1"
POETRY_URL: https://install.python-poetry.org

jobs:
build:
strategy:
Expand All @@ -15,16 +20,31 @@ jobs:
- name: Check-out repository
uses: actions/checkout@v4

- uses: actions/setup-python@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
id: setup_python

# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v3
with:
python-version: "3.9"
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v2
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- run: poetry --version

path: ~/.local
key: poetry-local-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Install Poetry ${{ env.POETRY_VERSION }}
run: |
curl -sSL ${{ env.POETRY_URL }} | python - --version ${{ env.POETRY_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install

- name: Build Executable
uses: Nuitka/Nuitka-Action@main
with:
Expand Down

0 comments on commit 50f94ef

Please sign in to comment.