|
1 | 1 | name: publish |
2 | 2 | concurrency: |
3 | 3 | group: ${{ github.workflow }} |
4 | | - cancel-in-progress: true |
5 | 4 | on: # yamllint disable-line rule:truthy |
6 | 5 | release: |
7 | 6 | types: [published] |
8 | 7 |
|
9 | 8 | jobs: |
10 | | - build: |
| 9 | + build-wheels: |
11 | 10 | if: ${{ github.repository == 'Dandelion-Science/python-evdev' }} |
12 | | - name: build py${{ matrix.python-version }} |
13 | | - runs-on: codebuild-dandelion-linux-amd64-${{ github.run_id }}-${{ github.run_attempt }} |
| 11 | + name: wheels on ${{ matrix.os }} |
| 12 | + # evdev is Linux-only (needs <linux/input.h>); no macOS/Windows wheels are |
| 13 | + # possible. Native runners build their own arch (archs = "native"), no QEMU. |
| 14 | + runs-on: ${{ matrix.os }} |
14 | 15 | strategy: |
15 | 16 | fail-fast: false |
16 | 17 | matrix: |
17 | | - python-version: ["3.13", "3.13t", "3.14", "3.14t"] |
18 | | - timeout-minutes: 15 |
19 | | - permissions: |
20 | | - id-token: write |
21 | | - contents: read |
| 18 | + os: [ubuntu-latest, ubuntu-24.04-arm] |
| 19 | + timeout-minutes: 30 |
22 | 20 | steps: |
23 | | - - uses: aws-actions/configure-aws-credentials@v6 |
24 | | - with: |
25 | | - aws-region: ${{ vars.AWS_REGION }} |
26 | | - role-to-assume: ${{ vars.ARN_IAM_ROLE_GHA_CORE }} |
27 | 21 | - uses: actions/checkout@v7 |
28 | 22 | with: |
29 | 23 | fetch-depth: 0 |
30 | | - - uses: Dandelion-Science/github-actions/setup-uv@main |
31 | | - with: |
32 | | - python-version: ${{ matrix.python-version }} |
33 | | - - run: uv build --wheel |
| 24 | + - uses: pypa/cibuildwheel@v4.1.0 |
34 | 25 | - uses: actions/upload-artifact@v4 |
35 | 26 | with: |
36 | | - name: dist-${{ matrix.python-version }} |
37 | | - path: dist/ |
| 27 | + name: cibw-wheels-${{ matrix.os }} |
| 28 | + path: ./wheelhouse/*.whl |
38 | 29 |
|
39 | 30 | build-sdist: |
40 | 31 | if: ${{ github.repository == 'Dandelion-Science/python-evdev' }} |
41 | | - runs-on: codebuild-dandelion-linux-arm64-${{ github.run_id }}-${{ github.run_attempt }} |
| 32 | + runs-on: ubuntu-slim |
42 | 33 | timeout-minutes: 15 |
43 | | - permissions: |
44 | | - id-token: write |
45 | | - contents: read |
46 | 34 | steps: |
47 | | - - uses: aws-actions/configure-aws-credentials@v6 |
48 | | - with: |
49 | | - aws-region: ${{ vars.AWS_REGION }} |
50 | | - role-to-assume: ${{ vars.ARN_IAM_ROLE_GHA_CORE }} |
51 | 35 | - uses: actions/checkout@v7 |
52 | 36 | with: |
53 | 37 | fetch-depth: 0 |
54 | | - - uses: Dandelion-Science/github-actions/setup-uv@main |
| 38 | + - uses: astral-sh/setup-uv@v7 |
55 | 39 | - run: uv build --sdist |
56 | 40 | - uses: actions/upload-artifact@v4 |
57 | 41 | with: |
58 | | - name: dist-sdist |
59 | | - path: dist/ |
| 42 | + name: cibw-sdist |
| 43 | + path: dist/*.tar.gz |
60 | 44 |
|
61 | 45 | publish: |
62 | | - if: ${{ github.repository == 'Dandelion-Science/python-evdev' }} |
63 | | - needs: [build, build-sdist] |
64 | | - runs-on: codebuild-dandelion-linux-arm64-${{ github.run_id }}-${{ github.run_attempt }} |
| 46 | + needs: [build-wheels, build-sdist] |
| 47 | + runs-on: ubuntu-slim |
65 | 48 | timeout-minutes: 15 |
66 | 49 | permissions: |
67 | 50 | id-token: write |
|
74 | 57 | - uses: actions/download-artifact@v4 |
75 | 58 | with: |
76 | 59 | path: dist |
| 60 | + pattern: cibw-* |
77 | 61 | merge-multiple: true |
78 | 62 | - uses: softprops/action-gh-release@v3 |
79 | 63 | with: |
|
92 | 76 | env: |
93 | 77 | UV_PUBLISH_USERNAME: aws |
94 | 78 | UV_PUBLISH_PASSWORD: ${{ env.AWS_CODEARTIFACT_TOKEN }} |
95 | | - UV_PUBLISH_URL: ${{ vars.CODEARTIFACT_DANDELION_PYPI_REPOSITORY_URL }} |
| 79 | + UV_PUBLISH_URL: ${{ vars.CODEARTIFACT_PYPI_STORE_REPOSITORY_URL }} |
0 commit comments