From ced956621df02a5009b8b4d8543a3dec120fad88 Mon Sep 17 00:00:00 2001 From: Jovan Gerodetti Date: Sun, 25 May 2025 11:52:05 +0200 Subject: [PATCH] Ubnutu 20.04 is deprecated --- .github/actions/install-python/action.yml | 12 ++++++++++++ .github/workflows/build.yaml | 4 +++- .github/workflows/ci.yaml | 12 +++++++++--- .github/workflows/release.yaml | 2 +- 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .github/actions/install-python/action.yml diff --git a/.github/actions/install-python/action.yml b/.github/actions/install-python/action.yml new file mode 100644 index 0000000..3711b87 --- /dev/null +++ b/.github/actions/install-python/action.yml @@ -0,0 +1,12 @@ +name: 'Install Python via UV' +description: 'Installs the requested python version via UV. This action expects uv to be setup.' +runs: + using: "composite" + steps: + - name: Download Python Version info + run: wget https://raw.githubusercontent.com/astral-sh/uv/refs/tags/0.6.17/crates/uv-python/download-metadata.json + shell: bash + + - name: Install requested python version + run: uv python install --python-downloads-json-url ./download-metadata.json + shell: bash diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5d9c1e8..207efae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: checkout @@ -25,6 +25,8 @@ jobs: uses: astral-sh/setup-uv@v5 with: version: "latest" + - name: Install python + uses: ./.github/actions/install-python - name: Install Dependencies run: uv sync - name: Build diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a74543..87facac 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: uses: ./.github/workflows/build.yaml ruff-lint: - runs-on: 'ubuntu-20.04' + runs-on: 'ubuntu-24.04' steps: - name: checkout @@ -20,6 +20,8 @@ jobs: uses: astral-sh/setup-uv@v5 with: version: "latest" + - name: install python + uses: ./.github/actions/install-python - name: install dependencies run: uv sync - name: lint @@ -32,7 +34,7 @@ jobs: uses: parkerbxyz/suggest-changes@v1.0.4 ruff-format: - runs-on: 'ubuntu-20.04' + runs-on: 'ubuntu-24.04' steps: - name: checkout @@ -41,6 +43,8 @@ jobs: uses: astral-sh/setup-uv@v5 with: version: "latest" + - name: install python + uses: ./.github/actions/install-python - name: install dependencies run: uv sync - name: format @@ -53,7 +57,7 @@ jobs: uses: parkerbxyz/suggest-changes@v1.0.4 mypy: - runs-on: 'ubuntu-20.04' + runs-on: 'ubuntu-24.04' steps: - name: checkout @@ -62,6 +66,8 @@ jobs: uses: astral-sh/setup-uv@v5 with: version: "latest" + - name: install python + uses: ./.github/actions/install-python - name: install dependencies run: uv sync - name: type check diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 306a9cc..e7afb60 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: create-release: needs: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: download all artifacts