Skip to content

Commit

Permalink
refactor: Update build configuration for multiple operating systems
Browse files Browse the repository at this point in the history
  • Loading branch information
rabii-chaarani committed Sep 30, 2024
1 parent 6a16cf5 commit e08087c
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(vars.BUILD_OS)}}
os: ["ubuntu-latest", "macos-latest", "macos-10", "windows-latest"]
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-latest", "macos-latest", "macos-10", "windows-latest"]
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -99,9 +99,9 @@ jobs:
name: conda-${{ matrix.os }}-${{ matrix.python-version }}
path: conda

make_sdist:
build-sdist:
needs: "continuous-integration"
name: Make SDist
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -113,8 +113,30 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
name: loopprojectfile-dist
path: dist/*.tar.gz

build-wheels:
needs: build-sdist
name: Build Wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "macos-10", "windows-latest"]
steps:
- uses: actions/checkout@v4

- name: Build Wheels
run: |
pip install build
python -m build --wheel
- uses: actions/upload-artifact@v4
with:
name: loopprojectfile-wheels
path: ./wheelhouse/*.whl
compression-level: 0

upload_to_conda:
needs: ["release-please", "conda-deploy"]
Expand All @@ -141,16 +163,16 @@ jobs:
upload_to_pypi:
runs-on: "ubuntu-latest"
needs: ["release-please", "conda-deploy"]
needs: ["release-please", build-sdist]
if: ${{ needs.release-please.outputs.release_created }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
name: loopprojectfile-dist
path: dist/*.tar.gz
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
Expand Down

0 comments on commit e08087c

Please sign in to comment.