Bump actions/setup-python from 5 to 6 (#19) #46
This file contains hidden or 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 publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| branches: | |
| - main | |
| - 'stable/**' | |
| jobs: | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Build distribution | |
| run: | | |
| pipx run build --sdist | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pkg-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheel on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-14, macos-15-intel, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Build wheel | |
| run: pipx run cibuildwheel==3.4.0 | |
| - name: Store the wheel | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pkg-wheel-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| github: | |
| name: Publish to GitHub | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build_sdist | |
| - build_wheels | |
| steps: | |
| - name: Checkout tag | |
| uses: actions/checkout@v7 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: pkg-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish release | |
| uses: ghalactic/github-release-from-tag@v6 | |
| with: | |
| prerelease: false | |
| generateReleaseNotes: "true" | |
| assets: | | |
| - path: dist/* | |
| pypi: | |
| name: Publish to pypi | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build_sdist | |
| - build_wheels | |
| - github | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/qiskit-paulice | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout tag | |
| uses: actions/checkout@v7 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: pkg-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish release to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |