Skip to content

Commit

Permalink
Aligning workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
merschformann committed Jun 28, 2024
1 parent 91cabb1 commit 50ee5bc
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions .github/workflows/build-wheels-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: build-wheels-push
# on: push

on:
workflow_dispatch:
release:
types:
- published
Expand Down Expand Up @@ -40,11 +39,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up QEMU # Required for aarch64 builds
if: matrix.buildplat[1] == 'manylinux_aarch64' || matrix.buildplat[1] == 'musllinux_aarch64'
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
- name: Build wheels (aarch64)
if: ${{ contains(matrix.buildplat[1], 'aarch64') }}
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ARCHS_LINUX: aarch64
- name: Build wheels (not aarch64)
if: ${{ !contains(matrix.buildplat[1], 'aarch64') }}
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
Expand Down Expand Up @@ -94,29 +100,29 @@ jobs:
# with:
# repository-url: https://test.pypi.org/legacy/

# upload_pypi:
# name: >-
# Publish highspy to PyPI
# runs-on: ubuntu-latest
# needs: [build_wheels, build_sdist]
upload_pypi:
name: >-
Publish highspy to PyPI
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]

# # upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

# environment:
# name: pypi
# url: https://pypi.org/p/highspy
environment:
name: pypi
url: https://pypi.org/p/highspy

# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

# steps:
# - uses: actions/download-artifact@v3
# with:
# # unpacks default artifact into dist/
# # if `name: artifact` is omitted, the action will create extra parent dir
# name: artifact
# path: dist
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

# - name: Download all
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Download all
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 50ee5bc

Please sign in to comment.