Skip to content

Commit

Permalink
publish wheels to pypi on release re-enable
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Jan 8, 2025
1 parent f3290df commit df7ca0a
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/build-wheels-push.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build-wheels-push

on: []
# on: []
# on: push

# on:
# release:
# types:
# - published
on:
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -82,51 +82,22 @@ jobs:
name: cibw-wheels-${{ matrix.python }}-${{ matrix.buildplat[1] }}
path: wheelhouse/*.whl

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

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

environment:
name: testpypi
url: https://test.pypi.org/p/highspy

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- name: Download all
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

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

# # 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
# name: testpypi
# url: https://test.pypi.org/p/highspy

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

# steps:
# - uses: actions/download-artifact@v4
# with:
Expand All @@ -136,3 +107,32 @@ jobs:

# - name: Download all
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# verbose: true

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')

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

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

steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

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

0 comments on commit df7ca0a

Please sign in to comment.