Skip to content

Commit c457f6a

Browse files
committed
switch to 2-stage publish workflow
1 parent db3bc1a commit c457f6a

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ jobs:
55
build:
66
runs-on: ubuntu-latest
77
if: github.event.ref_type == 'tag'
8-
permissions:
9-
id-token: write # required for trusted publishing
10-
environment: publish
118
steps:
129
- name: Checkout
1310
uses: actions/checkout@v4
@@ -22,7 +19,24 @@ jobs:
2219
python-version: '${{ steps.python-versions.outputs.min }}'
2320
pre-install: poetry
2421

22+
- uses: actions/upload-artifact@v4
23+
with:
24+
path: ./dist
25+
26+
27+
publish:
28+
needs: build
29+
runs-on: ubuntu-latest
30+
if: github.event.ref_type == 'tag'
31+
permissions:
32+
contents: none
33+
id-token: write # required for trusted publishing
34+
environment: publish
35+
steps:
36+
- uses: actions/download-artifact@v4
37+
2538
- name: Publish to PyPI
2639
uses: pypa/gh-action-pypi-publish@release/v1
2740
with:
41+
packages-dir: artifact/
2842
print-hash: true

0 commit comments

Comments
 (0)