All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 name: Build and publish
16 name: sdist + pure wheel
17 runs-on: ubuntu-latest
18 if: github.event_name == 'release'
21 - uses: actions/checkout@v4
23 - name: Set up latest Python
24 uses: actions/setup-python@v4
28 - name: Install latest pip, build, twine
30 python -m pip install --upgrade --disable-pip-version-check pip
31 python -m pip install --upgrade build twine
33 - name: Build wheel and source distributions
36 - if: github.event_name == 'release'
37 name: Upload to PyPI via Twine
39 TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
40 run: twine upload --verbose -u '__token__' dist/*
42 generate_wheels_matrix:
43 name: generate wheels matrix
44 runs-on: ubuntu-latest
46 include: ${{ steps.set-matrix.outputs.include }}
48 - uses: actions/checkout@v4
49 - name: Install cibuildwheel and pypyp
51 pipx install cibuildwheel==2.15.0
53 - name: generate matrix
54 if: github.event_name != 'pull_request'
57 cibuildwheel --print-build-identifiers --platform linux \
58 | pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})' \
59 && cibuildwheel --print-build-identifiers --platform macos \
60 | pyp 'json.dumps({"only": x, "os": "macos-latest"})' \
61 && cibuildwheel --print-build-identifiers --platform windows \
62 | pyp 'json.dumps({"only": x, "os": "windows-latest"})'
63 } | pyp 'json.dumps(list(map(json.loads, lines)))' > /tmp/matrix
65 CIBW_ARCHS_LINUX: x86_64
66 CIBW_ARCHS_MACOS: x86_64 arm64
67 CIBW_ARCHS_WINDOWS: AMD64
68 - name: generate matrix (PR)
69 if: github.event_name == 'pull_request'
71 cibuildwheel --print-build-identifiers --platform linux \
72 | pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})' \
73 | pyp 'json.dumps(list(map(json.loads, lines)))' > /tmp/matrix
75 CIBW_BUILD: "cp38-* cp311-*"
76 CIBW_ARCHS_LINUX: x86_64
78 run: echo "include=$(cat /tmp/matrix)" | tee -a $GITHUB_OUTPUT
81 name: mypyc wheels ${{ matrix.only }}
82 needs: generate_wheels_matrix
83 runs-on: ${{ matrix.os }}
87 include: ${{ fromJson(needs.generate_wheels_matrix.outputs.include) }}
90 - uses: actions/checkout@v4
91 - uses: pypa/cibuildwheel@v2.15.0
93 only: ${{ matrix.only }}
95 - name: Upload wheels as workflow artifacts
96 uses: actions/upload-artifact@v3
98 name: ${{ matrix.name }}-mypyc-wheels
99 path: ./wheelhouse/*.whl
101 - if: github.event_name == 'release'
102 name: Upload wheels to PyPI via Twine
104 TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
105 run: pipx run twine upload --verbose -u '__token__' wheelhouse/*.whl
107 update-stable-branch:
108 name: Update stable branch
110 runs-on: ubuntu-latest
111 if: github.event_name == 'release'
116 - name: Checkout stable branch
117 uses: actions/checkout@v4
122 - if: github.event_name == 'release'
123 name: Update stable branch to release tag & push
125 git reset --hard ${{ github.event.release.tag_name }}