Skip to content

Commit

Permalink
ci: add dryrun option to python actions
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Sep 19, 2024
1 parent 4dd08af commit 44ced4f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Publish nostr-protocol to PyPI

on: [workflow_dispatch]
on:
workflow_dispatch:
inputs:
dryrun:
default: "false",
options:
- "true"
- "false"
description: "Compile without publish to PyPI"
required: true

jobs:
build-linux-x86_64:
Expand Down Expand Up @@ -48,7 +57,7 @@ jobs:
python: ["3.9", "3.10", "3.11", "3.12"]
defaults:
run:
working-directory: bindings/nostr-ffi/bindings-python
working-directory: bindings/nostr-ffi/bindings-python
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand All @@ -66,7 +75,7 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: "Generate nostr.py and binaries"
run: bash ./scripts/generate-linux-aarch64.sh

Expand Down Expand Up @@ -182,6 +191,7 @@ jobs:
run:
working-directory: bindings/nostr-ffi/bindings-python
needs: [build-linux-x86_64, build-linux-aarch64, build-macos-arm64, build-macos-x86_64, build-windows]
if: inputs.dryrun == 'false'
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/publish-sdk-python.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Publish nostr-sdk to PyPI

on: [workflow_dispatch]
on:
workflow_dispatch:
inputs:
dryrun:
default: "false",
options:
- "true"
- "false"
description: "Compile without publish to PyPI"
required: true

jobs:
build-linux-x86_64:
Expand Down Expand Up @@ -48,7 +57,7 @@ jobs:
python: ["3.9", "3.10", "3.11", "3.12"]
defaults:
run:
working-directory: bindings/nostr-sdk-ffi/bindings-python
working-directory: bindings/nostr-sdk-ffi/bindings-python
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand All @@ -66,7 +75,7 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: "Generate nostr_sdk.py and binaries"
run: bash ./scripts/generate-linux-aarch64.sh

Expand Down Expand Up @@ -182,6 +191,7 @@ jobs:
run:
working-directory: bindings/nostr-sdk-ffi/bindings-python
needs: [build-linux-x86_64, build-linux-aarch64, build-macos-arm64, build-macos-x86_64, build-windows]
if: inputs.dryrun == 'false'
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down

0 comments on commit 44ced4f

Please sign in to comment.