Skip to content

Commit c8ce324

Browse files
committed
1
1 parent 7304ae0 commit c8ce324

File tree

3 files changed

+80
-2
lines changed

3 files changed

+80
-2
lines changed

.github/workflows/build-push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
- LICENSE
1818
- .github/dependabot.yml
1919
- .github/pull_request_template.md
20-
workflow_dispatch:
2120

2221
jobs:
2322
build-and-publish:
@@ -26,3 +25,5 @@ jobs:
2625
with:
2726
upload: ${{ github.event_name == 'push' && endsWith(github.event.ref, 'scylla') }}
2827
python-version: '3.13'
28+
ignore_tests: true
29+
target_tag: '3.29.0-scylla'

.github/workflows/lib-build-and-push.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,23 @@ on:
1616
default: "3.13"
1717

1818
target:
19-
description: "target os to build for: linux,macos,windows"
19+
description: "Target os to build for: linux,macos,windows"
2020
type: string
2121
required: false
2222
default: "linux,macos-x86,macos-arm,windows,linux-aarch64"
2323

24+
target_tag:
25+
description: "Publish particular tag"
26+
type: string
27+
required: false
28+
default: ""
29+
30+
ignore_tests:
31+
description: "Don't run tests"
32+
type: boolean
33+
required: false
34+
default: false
35+
2436
jobs:
2537
prepare-matrix:
2638
name: "Prepare matrix to run for ${{ inputs.python-version }} on `${{ inputs.target }}`"
@@ -73,6 +85,27 @@ jobs:
7385
steps:
7486
- uses: actions/checkout@v4
7587

88+
- name: Checkout tag ${{ inputs.target_tag }}
89+
if: inputs.target_tag != ''
90+
uses: actions/checkout@v4
91+
with:
92+
ref: ${{ inputs.target_tag }}
93+
94+
- name: Checkout pyproject.toml back
95+
if: inputs.target_tag != ''
96+
uses: actions/checkout@v4
97+
with:
98+
sparse-checkout: |
99+
pyproject.toml
100+
101+
- name: Disable tests
102+
if: inputs.ignore_tests
103+
shell: bash
104+
run: |
105+
echo "CIBW_TEST_COMMAND=''" >> $GITHUB_ENV;
106+
echo "CIBW_TEST_SKIP='*'" >> $GITHUB_ENV;
107+
echo "CIBW_BEFORE_TEST=''" >> $GITHUB_ENV;
108+
76109
- uses: actions/setup-python@v5
77110
name: Install Python
78111
with:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and upload to PyPi manually
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
upload:
7+
description: 'Upload to PyPI'
8+
type: boolean
9+
required: false
10+
default: false
11+
12+
python-version:
13+
description: 'Python version to run on'
14+
type: string
15+
required: true
16+
default: "3.13"
17+
18+
target:
19+
description: "Target os to build for: linux,macos,windows"
20+
type: string
21+
required: false
22+
default: "linux,macos-x86,macos-arm,windows,linux-aarch64"
23+
24+
target_tag:
25+
description: "Publish particular tag"
26+
type: string
27+
required: false
28+
default: ""
29+
30+
ignore_tests:
31+
description: "Don't run tests"
32+
type: boolean
33+
required: false
34+
default: false
35+
36+
jobs:
37+
build-and-publish:
38+
uses: ./.github/workflows/lib-build-and-push.yml
39+
with:
40+
upload: ${{ inputs.upload }}
41+
python-version: ${{ inputs.python-version }}
42+
ignore_tests: ${{ inputs.ignore_tests }}
43+
target_tag: ${{ inputs.target_tag }}
44+
target: ${{ inputs.target }}

0 commit comments

Comments
 (0)