Skip to content

Commit 5db3108

Browse files
committed
ci: add dryrun option to python actions
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 4dd08af commit 5db3108

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

.github/workflows/publish-python.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Publish nostr-protocol to PyPI
22

3-
on: [workflow_dispatch]
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry-run:
7+
description: "Compile without publish to PyPI"
8+
type: boolean
9+
default: false
10+
required: true
411

512
jobs:
613
build-linux-x86_64:
@@ -48,7 +55,7 @@ jobs:
4855
python: ["3.9", "3.10", "3.11", "3.12"]
4956
defaults:
5057
run:
51-
working-directory: bindings/nostr-ffi/bindings-python
58+
working-directory: bindings/nostr-ffi/bindings-python
5259
steps:
5360
- name: "Checkout"
5461
uses: actions/checkout@v3
@@ -66,7 +73,7 @@ jobs:
6673
run: |
6774
sudo apt-get update -y
6875
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
69-
76+
7077
- name: "Generate nostr.py and binaries"
7178
run: bash ./scripts/generate-linux-aarch64.sh
7279

@@ -182,6 +189,7 @@ jobs:
182189
run:
183190
working-directory: bindings/nostr-ffi/bindings-python
184191
needs: [build-linux-x86_64, build-linux-aarch64, build-macos-arm64, build-macos-x86_64, build-windows]
192+
if: github.event.inputs.dry-run == 'false'
185193
steps:
186194
- name: "Checkout"
187195
uses: actions/checkout@v3

.github/workflows/publish-sdk-python.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Publish nostr-sdk to PyPI
22

3-
on: [workflow_dispatch]
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry-run:
7+
description: "Compile without publish to PyPI"
8+
type: boolean
9+
default: false
10+
required: true
411

512
jobs:
613
build-linux-x86_64:
@@ -48,7 +55,7 @@ jobs:
4855
python: ["3.9", "3.10", "3.11", "3.12"]
4956
defaults:
5057
run:
51-
working-directory: bindings/nostr-sdk-ffi/bindings-python
58+
working-directory: bindings/nostr-sdk-ffi/bindings-python
5259
steps:
5360
- name: "Checkout"
5461
uses: actions/checkout@v3
@@ -66,7 +73,7 @@ jobs:
6673
run: |
6774
sudo apt-get update -y
6875
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
69-
76+
7077
- name: "Generate nostr_sdk.py and binaries"
7178
run: bash ./scripts/generate-linux-aarch64.sh
7279

@@ -182,6 +189,7 @@ jobs:
182189
run:
183190
working-directory: bindings/nostr-sdk-ffi/bindings-python
184191
needs: [build-linux-x86_64, build-linux-aarch64, build-macos-arm64, build-macos-x86_64, build-windows]
192+
if: github.event.inputs.dry-run == 'false'
185193
steps:
186194
- name: "Checkout"
187195
uses: actions/checkout@v3

0 commit comments

Comments
 (0)