|
9 | 9 | - 'prerelease-v[0-9]+.[0-9]+.[0-9]+**' |
10 | 10 | jobs: |
11 | 11 | build_wheels: |
12 | | - name: Build wheels on ${{ matrix.os }} |
13 | | - runs-on: ${{ matrix.os }} |
14 | | - strategy: |
15 | | - matrix: |
16 | | - # macos-13 is an intel runner, macos-14 is apple silicon |
17 | | - os: [ubuntu-latest, windows-latest, macos-13, macos-14, ubuntu-24.04-arm] |
18 | | - |
19 | | - steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - # aarch64 (arm) is built via qemu emulation |
22 | | - # QEMU is sadly too slow. We need to wait for public ARM support |
23 | | - #- name: Set up QEMU |
24 | | - # if: runner.os == 'Linux' |
25 | | - # uses: docker/setup-qemu-action@v3 |
26 | | - # with: |
27 | | - # platforms: all |
28 | | - - name: Build wheels |
29 | | - |
30 | | - env: |
31 | | - CIBW_ARCHS_LINUX: auto |
32 | | - with: |
33 | | - package-dir: . |
34 | | - output-dir: wheelhouse |
35 | | - config-file: "{package}/pyproject.toml" |
36 | | - - uses: actions/upload-artifact@v4 |
37 | | - with: |
38 | | - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
39 | | - path: ./wheelhouse/*.whl |
40 | | - |
41 | | - build_sdist: |
42 | | - name: Build source distribution |
43 | | - runs-on: ubuntu-latest |
44 | | - steps: |
45 | | - - uses: actions/checkout@v4 |
46 | | - |
47 | | - - name: Build sdist |
48 | | - run: pipx run build --sdist |
49 | | - - uses: actions/upload-artifact@v4 |
50 | | - with: |
51 | | - name: cibw-sdist |
52 | | - path: dist/*.tar.gz |
53 | | - create_release: |
54 | | - needs: [build_wheels, build_sdist] |
55 | | - runs-on: ubuntu-latest |
| 12 | + uses: explosion/gha-cibuildwheel/.github/workflows/cibuildwheel.yml@main |
56 | 13 | permissions: |
57 | 14 | contents: write |
58 | | - checks: write |
59 | 15 | actions: read |
60 | | - issues: read |
61 | | - packages: write |
62 | | - pull-requests: read |
63 | | - repository-projects: read |
64 | | - statuses: read |
65 | | - steps: |
66 | | - - name: Get the tag name and determine if it's a prerelease |
67 | | - id: get_tag_info |
68 | | - run: | |
69 | | - FULL_TAG=${GITHUB_REF#refs/tags/} |
70 | | - if [[ $FULL_TAG == release-* ]]; then |
71 | | - TAG_NAME=${FULL_TAG#release-} |
72 | | - IS_PRERELEASE=false |
73 | | - elif [[ $FULL_TAG == prerelease-* ]]; then |
74 | | - TAG_NAME=${FULL_TAG#prerelease-} |
75 | | - IS_PRERELEASE=true |
76 | | - else |
77 | | - echo "Tag does not match expected patterns" >&2 |
78 | | - exit 1 |
79 | | - fi |
80 | | - echo "FULL_TAG=$TAG_NAME" >> $GITHUB_ENV |
81 | | - echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV |
82 | | - echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV |
83 | | - - uses: actions/download-artifact@v4 |
84 | | - with: |
85 | | - # unpacks all CIBW artifacts into dist/ |
86 | | - pattern: cibw-* |
87 | | - path: dist |
88 | | - merge-multiple: true |
89 | | - - name: Create Draft Release |
90 | | - id: create_release |
91 | | - uses: softprops/action-gh-release@v2 |
92 | | - if: startsWith(github.ref, 'refs/tags/') |
93 | | - env: |
94 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
95 | | - with: |
96 | | - name: ${{ env.TAG_NAME }} |
97 | | - draft: true |
98 | | - prerelease: ${{ env.IS_PRERELEASE }} |
99 | | - files: "./dist/*" |
| 16 | + with: |
| 17 | + wheel-name-pattern: "thinc-*.whl" |
| 18 | + pure-python: false |
| 19 | + secrets: |
| 20 | + gh-token: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + |
0 commit comments