release: バージョンを 0.7.0 に更新 — 編集機能一式 (E1–E6) #28
Workflow file for this run
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: wheels | |
| # Build cross-platform binary wheels + sdist with cibuildwheel. | |
| # No vcpkg: zlib is taken from the system if present, else fetched from source | |
| # by CMake (see psdparse/CMakeLists.txt), so the matrix needs no extra setup. | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ["v*"] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: wheels-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_wheels: | |
| name: wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # macos-13 (Intel) ランナーは縮小されキュー待ちが長い。macos-14 (arm64) | |
| # 上で x86_64/arm64 を両方クロスビルドするので Intel ランナーは使わない。 | |
| os: [ubuntu-latest, windows-latest, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wheels | |
| # v3.2.1+ supports CPython 3.14 (cp314); v2.21 stopped at cp313. | |
| uses: pypa/cibuildwheel@v3.2.1 | |
| env: | |
| # pybind11 needs no PyPy; trim 32-bit (Linux i686 / Windows win32) and musl. | |
| CIBW_SKIP: "pp* *_i686 *-musllinux_* *-win32" | |
| # also build free-threaded CPython wheels (cp313t / cp314t). | |
| CIBW_ENABLE: "cpython-freethreading" | |
| # build both Mac archs on the arm64 runner (x86_64 is cross-built; | |
| # its import test is auto-skipped by cibuildwheel). | |
| CIBW_ARCHS_MACOS: "x86_64 arm64" | |
| # c++17 needs a modern deployment target on macOS x86_64. | |
| MACOSX_DEPLOYMENT_TARGET: "10.13" | |
| # smoke-test the built wheel imports and exposes the API. | |
| CIBW_TEST_COMMAND: >- | |
| python -c "import psdparse; assert hasattr(psdparse, 'PSDFile'); print('psdparse import OK')" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| make_sdist: | |
| name: sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| publish-testpypi: | |
| name: publish to TestPyPI (dry run) | |
| needs: [build_wheels, make_sdist] | |
| runs-on: ubuntu-latest | |
| # manual trigger only — a dry run before the real release. | |
| if: github.event_name == 'workflow_dispatch' | |
| environment: testpypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| publish: | |
| name: publish to PyPI | |
| needs: [build_wheels, make_sdist] | |
| runs-on: ubuntu-latest | |
| # only on a version tag; uses PyPI Trusted Publishing (no API token needed). | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 |