From c67f5779f8374daed4f539dd0ba218787b6a50e3 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 2 Nov 2026 12:04:48 +0200 Subject: [PATCH] change anaconda upload conditions --- .github/workflows/posix.yml | 5 ++++- .github/workflows/windows-arm.yml | 5 ++++- .github/workflows/windows.yml | 5 ++++- CHANGELOG.md | 4 ++++ pyproject.toml | 2 +- tools/upload_to_anaconda_staging.sh | 21 +++++++++++---------- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index c1e0a7ea..12182965 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -123,7 +123,10 @@ jobs: upload: name: Upload to anaconda.org needs: build - if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + if: >- + github.repository == 'MacPython/openblas-libs' + && !inputs.publish + && github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml index 863f7bef..d6472edd 100644 --- a/.github/workflows/windows-arm.yml +++ b/.github/workflows/windows-arm.yml @@ -94,7 +94,10 @@ jobs: path: dist/scipy_openblas*.whl upload: - if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + if: >- + github.repository == 'MacPython/openblas-libs' + && !inputs.publish + && github.event_name != 'pull_request' name: Upload to anaconda.org needs: build runs-on: ubuntu-latest diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 68178609..18b0eb89 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -181,7 +181,10 @@ jobs: python -m pkgconf scipy-openblas --cflags upload: - if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + if: >- + github.repository == 'MacPython/openblas-libs' + && !inputs.publish + && github.event_name != 'pull_request' name: Upload to anaconda.org needs: build runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index ca17f277..019d8b61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## OpenBLAS v0.3.34 (v0.3.34) +### 0.3.34.481.3 (2026-11-2) + +- Refactor gha upload to anaconda.org + ### 0.3.34.481.2 (2026-11-01) - Add Android wheels diff --git a/pyproject.toml b/pyproject.toml index c15e9b18..f03f77a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" # 0.3.34-481-g5137bb62 -version = "0.3.34.481.2" +version = "0.3.34.481.3" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" diff --git a/tools/upload_to_anaconda_staging.sh b/tools/upload_to_anaconda_staging.sh index bf6da2ed..1ed4e04a 100644 --- a/tools/upload_to_anaconda_staging.sh +++ b/tools/upload_to_anaconda_staging.sh @@ -17,15 +17,16 @@ upload_wheels() { VERSION=$(cat openblas_commit.txt) fi - if [ "$ANACONDA_SCIENTIFIC_PYTHON_UPLOAD" == "" ]; then - echo "ANACONDA_SCIENTIFIC_PYTHON_UPLOAD is not defined: skipping." - else - echo "Uploading OpenBLAS $VERSION to anaconda.org staging:" - # This needs renewal yearly, see - # https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#access-to-the-scientific-python-nightly-wheels-channel - - anaconda -t $ANACONDA_SCIENTIFIC_PYTHON_UPLOAD upload \ - --no-progress --force -u scientific-python-nightly-wheels \ - dist/scipy_openblas*.whl + if [ -z "$ANACONDA_SCIENTIFIC_PYTHON_UPLOAD" ]; then + echo "ANACONDA_SCIENTIFIC_PYTHON_UPLOAD is not defined" >&2 + return 1 fi + + echo "Uploading OpenBLAS $VERSION to anaconda.org staging:" + # This needs renewal yearly, see + # https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#access-to-the-scientific-python-nightly-wheels-channel + + anaconda -t $ANACONDA_SCIENTIFIC_PYTHON_UPLOAD upload \ + --no-progress --force -u scientific-python-nightly-wheels \ + dist/scipy_openblas*.whl }