Skip to content

Commit b01f4fe

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 b01f4fe

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/build-push.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ 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+
steps:
24+
- uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
skip-existing: true

.github/workflows/publish-manually.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,22 @@ 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+
steps:
54+
- uses: pypa/gh-action-pypi-publish@release/v1
55+
with:
56+
skip-existing: true

0 commit comments

Comments
 (0)