Skip to content

Refactor multiple_int_3d.py: #217

Refactor multiple_int_3d.py:

Refactor multiple_int_3d.py: #217

Workflow file for this run

name: poetry-build
on:
push:
branches: [ "master","dev", "tiny", "0.53.0"]
jobs:
build:
strategy:
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
exclude:
- os: windows-latest
python-version: "3.13"
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ steps.extract_branch.outputs.branch }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Poetry build
run: |
source $VENV
poetry build
- name: Artifact name
id: artifactname
run: |
cd dist
echo "wheelfile=$(ls *.whl| head -1)" >> $GITHUB_OUTPUT
- name: Debug artifact name
run: |
echo "Artifact name: ${{ steps.artifactname.outputs.wheelfile}}"
- name: Upload artifact
uses: actions/upload-artifact@v4.3.1
with:
path: dist
name: ${{ steps.artifactname.outputs.wheelfile }}
overwrite: true
upload_pypi:
needs: [ build ]
if: ${{ github.ref == 'refs/heads/tiny' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/mmcore/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: mmcore-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
upload_test_pypi:
needs: [ build ]
if: ${{ github.ref == 'refs/heads/test' }}
runs-on: ubuntu-latest
environment:
name: test-pypi
url: https://test.pypi.org/project/mmcore/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: mmcore-*
path: dist
merge-multiple: true
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}