@@ -99,14 +99,16 @@ jobs:
99
99
steps :
100
100
- uses : actions/checkout@v3
101
101
- name : Install and configure Poetry
102
- uses : snok/install-poetry@v1
103
- with :
104
- version : 1.8.5
102
+ run : pipx install poetry
103
+ - name : Hotswap build backend for Poetry
104
+ # Maturin doesn't support building no-extension wheels, so we swap to Poetry for that
105
+ run : |
106
+ sed -i '/^\[build-system\]/,/^\[/{s/^requires = .*/requires = ["poetry-core>=2.0.0,<3.0.0"]/ s/^build-backend = .*/build-backend = "poetry.core.masonry.api"/}' pyproject.toml
105
107
- name : Install dependencies
106
108
run : poetry install --only main --only test --only typing --only build
107
109
- name : Run poetry build
108
110
run : poetry build
109
- - name : Upload sdist
111
+ - name : Upload no-ext wheel
110
112
uses : actions/upload-artifact@v4
111
113
with :
112
114
name : dist-any
@@ -117,10 +119,12 @@ jobs:
117
119
needs : [ build, build_sdist, build_none ]
118
120
if : success()
119
121
runs-on : ubuntu-latest
120
- environment : release
121
122
permissions :
122
123
id-token : write
123
124
contents : write
125
+ environment :
126
+ name : pypi
127
+ url : https://pypi.org/project/pendulum/
124
128
steps :
125
129
- name : Checkout code
126
130
uses : actions/checkout@v2
@@ -132,9 +136,6 @@ jobs:
132
136
path : dist
133
137
merge-multiple : true
134
138
135
- - name : Update PATH
136
- run : echo "$HOME/.local/bin" >> $GITHUB_PATH
137
-
138
139
- name : Check distributions
139
140
run : |
140
141
ls -la dist
@@ -151,6 +152,7 @@ jobs:
151
152
artifacts : " dist/*"
152
153
draft : false
153
154
prerelease : steps.check-version.outputs.prerelease == 'true'
155
+ body : " See CHANGELOG.md for details"
154
156
155
157
- name : Publish package distributions to PyPI
156
158
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments