Update plotspectra.py #727
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: Build and deploy to PyPI/testPyPI | |
on: | |
push: | |
merge_group: | |
release: | |
types: [published, edited] | |
repository_dispatch: | |
types: [trigger_checks] | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
name: Build wheels for ${{ matrix.os_arch }} | |
strategy: | |
matrix: | |
os_arch: [manylinux_x86_64, musllinux_x86_64, macosx_arm64] | |
fail-fast: false | |
runs-on: ${{ startsWith(matrix.os_arch, 'macosx') && 'macos-14' || 'ubuntu-24.04'}} | |
env: | |
CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ARTISTOOLS | |
CIBW_BUILD: 'cp3*-${{ matrix.os_arch }}' | |
MACOSX_DEPLOYMENT_TARGET: 14.0 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- name: Cache rust build | |
uses: actions/cache@v4 | |
with: | |
path: rust/target/ | |
key: cibuildwheel-rust-target-${{ matrix.os_arch }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }} | |
restore-keys: | | |
cibuildwheel-rust-target-${{ matrix.os_arch }}-${{ hashFiles('**/Cargo.lock') }}- | |
cibuildwheel-rust-target-${{ matrix.os_arch }}- | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade uv | |
python3 -m uv pip install --upgrade setuptools setuptools_scm[toml] setuptools-rust wheel twine build | |
echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ARTISTOOLS=$(python3 -m setuptools_scm --strip-dev)" >> $GITHUB_ENV | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os_arch }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade setuptools setuptools_scm[toml] setuptools-rust wheel twine build | |
echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ARTISTOOLS=$(python3 -m setuptools_scm --strip-dev)" >> $GITHUB_ENV | |
- name: Build sdist | |
run: | | |
python3 -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: dist/*.tar.gz | |
testdeploy: | |
name: Test upload to TestPyPI | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-24.04 | |
environment: test | |
permissions: | |
id-token: write | |
if: startsWith(github.ref , 'refs/tags/v') != true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade uv | |
python3 -m uv pip install --upgrade setuptools setuptools_scm[toml] setuptools-rust wheel twine build | |
- name: Publish package to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
verbose: false | |
repository-url: https://test.pypi.org/legacy/ | |
deploy: | |
name: Upload to PyPI | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-24.04 | |
environment: release | |
permissions: | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade uv | |
python3 -m uv pip install --upgrade setuptools setuptools_scm[toml] setuptools-rust wheel twine build | |
echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_ARTISTOOLS=$(python3 -m setuptools_scm --strip-dev)" >> $GITHUB_ENV | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
verbose: false | |
#repository-url: https://test.pypi.org/legacy/ |