Skip to content

Commit 9247b5e

Browse files
committed
cicd: move out publishing stage from reusable workflow
There is bug in publishing github action: pypa/gh-action-pypi-publish#166 that does not allow to publish from reusable workflows. So we have to move it out.
1 parent 279ba24 commit 9247b5e

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

.github/workflows/build-push.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ on:
99

1010
jobs:
1111
build-and-publish:
12+
name: "Build wheels"
1213
uses: ./.github/workflows/lib-build-and-push.yml
1314
with:
14-
upload: ${{ endsWith(github.event.ref, 'scylla') }}
15+
upload: false
16+
17+
# TODO: Remove when https://github.com/pypa/gh-action-pypi-publish/issues/166 is fixed and update build-and-publish.with.upload to ${{ endsWith(github.event.ref, 'scylla') }}
18+
publish:
19+
name: "Publish wheels to PyPi"
20+
if: ${{ endsWith(github.event.ref, 'scylla') }}
21+
needs: build-and-publish
22+
runs-on: ubuntu-22.04
23+
permissions:
24+
id-token: write
25+
steps:
26+
- uses: actions/download-artifact@v4
27+
with:
28+
path: dist
29+
merge-multiple: true
30+
31+
- uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
skip-existing: true

.github/workflows/publish-manually.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,29 @@ on:
3535

3636
jobs:
3737
build-and-publish:
38+
name: "Build wheels"
3839
uses: ./.github/workflows/lib-build-and-push.yml
3940
with:
40-
upload: ${{ inputs.upload }}
41+
upload: false
4142
python-version: ${{ inputs.python-version }}
4243
ignore_tests: ${{ inputs.ignore_tests }}
4344
target_tag: ${{ inputs.target_tag }}
4445
target: ${{ inputs.target }}
46+
47+
# TODO: Remove when https://github.com/pypa/gh-action-pypi-publish/issues/166 is fixed and update build-and-publish.with.upload to ${{ inputs.upload }}
48+
publish:
49+
name: "Publish wheels to PyPi"
50+
needs: build-and-publish
51+
if: inputs.upload
52+
runs-on: ubuntu-22.04
53+
permissions:
54+
id-token: write
55+
steps:
56+
- uses: actions/download-artifact@v4
57+
with:
58+
path: dist
59+
merge-multiple: true
60+
61+
- uses: pypa/gh-action-pypi-publish@release/v1
62+
with:
63+
skip-existing: true

0 commit comments

Comments
 (0)