diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml new file mode 100644 index 000000000..c6fd4a14e --- /dev/null +++ b/.github/actions/setup-python/action.yml @@ -0,0 +1,18 @@ +name: 'Python Setup' +description: 'Installs Python with sensible default values' +inputs: + architecture: + description: "The architecture of Python to set up" + default: ${{ runner.arch }} + version: + description: "The version of Python to set up" + default: '3.13' +runs: + using: 'composite' + steps: + - uses: actions/setup-python@v7 + with: + cache: pip + python-version: ${{ inputs.version }} + check-latest: true + architecture: ${{ inputs.architecture }} diff --git a/.github/workflows/_job_cx-freeze-appimage.yml b/.github/workflows/_job_cx-freeze-appimage.yml index 1f42ff772..65089eda2 100644 --- a/.github/workflows/_job_cx-freeze-appimage.yml +++ b/.github/workflows/_job_cx-freeze-appimage.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies run: | diff --git a/.github/workflows/_job_cx-freeze-dmg.yml b/.github/workflows/_job_cx-freeze-dmg.yml index 54dad52af..d0a23c0fb 100644 --- a/.github/workflows/_job_cx-freeze-dmg.yml +++ b/.github/workflows/_job_cx-freeze-dmg.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies env: diff --git a/.github/workflows/_job_cx-freeze-msi.yml b/.github/workflows/_job_cx-freeze-msi.yml index bb5bd9352..b560a721f 100644 --- a/.github/workflows/_job_cx-freeze-msi.yml +++ b/.github/workflows/_job_cx-freeze-msi.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies run: | diff --git a/.github/workflows/_job_nuitka-linux.yml b/.github/workflows/_job_nuitka-linux.yml index c031dd7f9..5ade67e81 100644 --- a/.github/workflows/_job_nuitka-linux.yml +++ b/.github/workflows/_job_nuitka-linux.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies run: | diff --git a/.github/workflows/_job_nuitka-macos.yml b/.github/workflows/_job_nuitka-macos.yml index 109b8bc86..1b69f43f0 100644 --- a/.github/workflows/_job_nuitka-macos.yml +++ b/.github/workflows/_job_nuitka-macos.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies env: diff --git a/.github/workflows/_job_nuitka-windows.yml b/.github/workflows/_job_nuitka-windows.yml index 4228b0dae..a0077eb00 100644 --- a/.github/workflows/_job_nuitka-windows.yml +++ b/.github/workflows/_job_nuitka-windows.yml @@ -26,11 +26,8 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 + - uses: ./.github/actions/setup-python with: - cache: pip - python-version: '3.13' - check-latest: true architecture: ${{ matrix.pyarch }} - name: Install build dependencies run: | diff --git a/.github/workflows/_job_pypi.yml b/.github/workflows/_job_pypi.yml index 8fbfc376c..bde57899d 100644 --- a/.github/workflows/_job_pypi.yml +++ b/.github/workflows/_job_pypi.yml @@ -20,11 +20,7 @@ jobs: with: fetch-depth: 0 fetch-tags: true - - uses: actions/setup-python@v7 - with: - cache: pip - python-version: '3.13' - check-latest: true + - uses: ./.github/actions/setup-python - name: Install build dependencies run: | pip3 install --upgrade pip diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0b3c522e1..2934400fc 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -31,9 +31,9 @@ jobs: steps: - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v7 + uses: ./.github/actions/setup-python with: - python-version: ${{ matrix.version }} + version: ${{ matrix.version }} - name: Install dependencies run: | python3 -m pip install --upgrade pip