Skip to content

Commit

Permalink
fix: revert PYPI distro workflow to previoue setup on ubuntu only
Browse files Browse the repository at this point in the history
  • Loading branch information
r-leyshon committed Jul 4, 2024
1 parent eec89b7 commit 6ecfb39
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 <package-name> 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
Expand Down

0 comments on commit 6ecfb39

Please sign in to comment.