Skip to content

Commit df18589

Browse files
Secrusashb
authored andcommitted
Fix noext builds and setup or Trusted publisher
1 parent 5bd4a1d commit df18589

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ jobs:
9999
steps:
100100
- uses: actions/checkout@v3
101101
- 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
105107
- name: Install dependencies
106108
run: poetry install --only main --only test --only typing --only build
107109
- name: Run poetry build
108110
run: poetry build
109-
- name: Upload sdist
111+
- name: Upload no-ext wheel
110112
uses: actions/upload-artifact@v4
111113
with:
112114
name: dist-any
@@ -117,10 +119,12 @@ jobs:
117119
needs: [ build, build_sdist, build_none ]
118120
if: success()
119121
runs-on: ubuntu-latest
120-
environment: release
121122
permissions:
122123
id-token: write
123124
contents: write
125+
environment:
126+
name: pypi
127+
url: https://pypi.org/project/pendulum/
124128
steps:
125129
- name: Checkout code
126130
uses: actions/checkout@v2
@@ -132,9 +136,6 @@ jobs:
132136
path: dist
133137
merge-multiple: true
134138

135-
- name: Update PATH
136-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
137-
138139
- name: Check distributions
139140
run: |
140141
ls -la dist
@@ -151,6 +152,7 @@ jobs:
151152
artifacts: "dist/*"
152153
draft: false
153154
prerelease: steps.check-version.outputs.prerelease == 'true'
155+
body: "See CHANGELOG.md for details"
154156

155157
- name: Publish package distributions to PyPI
156158
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)