Skip to content

Merge plotting updates for version 0.1.2 #13

Merge plotting updates for version 0.1.2

Merge plotting updates for version 0.1.2 #13

name: CI-Build-Publish
on:
push:
branches:
- main
paths:
- pybeepop/**
- .github/workflows/ci-build-publish.yml
- pyproject.toml
- build.py
# tags:
# - '*.*.*'
pull_request:
release:
types: [ published ]
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Checkout BeePop+ code
uses: actions/checkout@v4
with:
repository: quanted/vpoplib
ref: dev
path: beepop
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: auto64
CIBW_BUILD_VERBOSITY: 1
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
with:
config-file: "pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run poetry build --format=sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_testpypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pybeepop-plus
permissions:
id-token: write
# if: github.event_name == 'release' && github.event.action == 'created'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pybeepop-plus
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true