From 6ecfb39546ac592132a37c9233a7133e63caad5c Mon Sep 17 00:00:00 2001 From: r-leyshon Date: Thu, 4 Jul 2024 14:41:03 +0100 Subject: [PATCH] fix: revert PYPI distro workflow to previoue setup on ubuntu only --- .github/workflows/build-deploy.yml | 52 ++++++++++++++++-------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 4d7a4ed..61bb5ca 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -10,12 +10,12 @@ on: tags: - v*.*.* jobs: - upload: - strategy: - matrix: - runs-on: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.runs-on }} + build: + name: Integration + runs-on: ubuntu-latest timeout-minutes: 30 + strategy: + fail-fast: false steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # sha for 4.1.7 - name: Set up Python 3.11 @@ -27,6 +27,14 @@ jobs: run: | python -m pip install --upgrade pip pip install '.[test,dev]' + - name: Install java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11.0.21' + - name: Check Java Install + run: | + java --version - name: Run All tests, including integration & sanitycheck run: | pytest --runinteg --sanitycheck @@ -39,43 +47,39 @@ jobs: - name: Store the distribution uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # sha for v4.3.3 with: - name: python-package-distributions-${{ matrix.runs-on }} # upload artifact v4 - artifacts are immutable, see https://github.com/actions/download-artifact/blob/main/docs/MIGRATION.md + name: python-package-distributions path: ./dist/* publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI - strategy: - matrix: - runs-on: [ubuntu-latest, macos-latest] # container action only available on linux - runs-on: ${{ matrix.runs-on }} if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/assess-gtfs # Replace with your PyPI project name permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - contents: write - pages: write + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + contents: write + pages: write steps: - - name: Download all the dists - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - with: - path: dist/ - pattern: python-package-distributions-${{ matrix.runs-on }} - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0 + - name: Download all the dists + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0 github-release: name: >- Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release - strategy: - matrix: - runs-on: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.runs-on }} needs: - publish-to-pypi + runs-on: ubuntu-latest permissions: contents: write # IMPORTANT: mandatory for making GitHub Releases id-token: write # IMPORTANT: mandatory for sigstore