Bump the github-actions group with 3 updates #213
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 | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build_bdist: | |
| name: "Build ${{ matrix.os }} (${{ matrix.arch }}) wheels" | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 # should be long enough even on tags, but let's prevent hangs | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| arch: x86_64 | |
| - os: ubuntu-22.04-arm | |
| arch: aarch64 | |
| - os: windows-2022 | |
| arch: AMD64 | |
| - os: macos-14 | |
| arch: arm64 | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| - os: windows-11-arm | |
| arch: ARM64 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Build just oldest and newest on PRs, all on tags | |
| if: ${{ github.event_name == 'pull_request' }} | |
| shell: bash | |
| # - On PPs, omit musllinux for speed | |
| # - On PRs, run just oldest and newest Python versions (3.11 is the oldest abi3 target) | |
| run: | | |
| CIBW_SKIP="cp310-win_arm64 *musllinux*" | |
| echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV | |
| echo "Setting CIBW_SKIP=$CIBW_SKIP" | |
| CIBW_TEST_SKIP="cp312-* cp313-*" | |
| echo "CIBW_TEST_SKIP=$CIBW_TEST_SKIP" >> $GITHUB_ENV | |
| echo "Setting CIBW_TEST_SKIP=$CIBW_TEST_SKIP" | |
| - name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels" | |
| uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0 | |
| env: | |
| CIBW_SKIP: ${{ env.CIBW_SKIP }} | |
| CIBW_TEST_SKIP: ${{ env.CIBW_TEST_SKIP }} | |
| CIBW_ARCHS: ${{ matrix.arch }} | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: pypi-artifacts-${{ matrix.os }}-${{ matrix.arch }} | |
| path: ${{ github.workspace }}/wheelhouse/*.whl | |
| permissions: | |
| actions: write | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Build sdist | |
| run: > | |
| pip install build | |
| && python -m build --sdist . --outdir dist | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: pypi-artifacts | |
| path: ${{ github.workspace }}/dist/*.tar.gz | |
| permissions: | |
| actions: write | |
| publish-artifacts-pypi: | |
| needs: [build_bdist, build_sdist] | |
| name: "Publish to PyPI" | |
| runs-on: ubuntu-22.04 | |
| # upload to PyPI for every tag starting with 'v' | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| pattern: pypi-artifacts* | |
| path: ${{ github.workspace }}/dist | |
| merge-multiple: true | |
| # Move to Trusted Publishing | |
| - uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 | |
| with: | |
| print_hash: true | |
| environment: | |
| name: release | |
| url: https://pypi.org/p/cftime | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing |