disable macOS builds #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python 🐍 distributions 📦 to TestPyPI | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: read | |
jobs: | |
# Wheels no longer offered until library linking is clarified. | |
build: | |
name: Build Source distribution and Wheels | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# fail-fast: false | |
matrix: | |
# os: ["ubuntu-latest", "macos-latest"] | |
# python-version: ["3.8", "3.9", "3.10", "3.11"] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.x" | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python3 | |
id: pyinstalled | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# - name: Set up Python${{ matrix.python-version }} with NetCDF4 (conda) | |
# if: ${{ matrix.os == 'windows-latest' }} | |
# uses: mamba-org/provision-with-micromamba@main | |
# with: | |
# cache-downloads: true | |
# micromamba-version: 'latest' | |
# extra-specs: | | |
# python=${{ matrix.python-version }} | |
# build | |
# virtualenv | |
# - name: Install NetCDF4 (Ubuntu/apt) | |
# if: ${{ matrix.os == 'ubuntu-latest' }} | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install libnetcdf-dev | |
# - name: Install NetCDF4 (macOS/homebrew) | |
# if: ${{ matrix.os == 'macos-latest' }} | |
# uses: tecolicom/actions-use-homebrew-tools@v1 | |
# with: | |
# tools: netcdf | |
# cache: yes | |
- name: Install packaging libraries (Ubuntu/macOS) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: ${{ steps.pyinstalled.outputs.python-path }} -m pip install build virtualenv | |
# - name: Build a binary wheel (Windows) | |
# if: ${{ matrix.os == 'windows-latest' }} | |
# run: python -m build --wheel | |
# - name: Build a binary wheel (Ubuntu/macOS) | |
# if: ${{ matrix.os != 'windows-latest' }} | |
# run: ${{ steps.pyinstalled.outputs.python-path }} -m build --wheel | |
- name: Build a source tarball (Ubuntu) | |
if: | | |
(matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.x') | |
run: ${{ steps.pyinstalled.outputs.python-path }} -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
dist/*.tar.gz | |
# dist/*.whl | |
if-no-files-found: error | |
publish-testpypi: | |
name: Publish Python 🐍 distributions 📦 to TestPyPI | |
needs: build | |
runs-on: ubuntu-latest | |
environment: staging | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
id: download | |
with: | |
name: artifact | |
path: dist | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
print-hash: true | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true |