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 5db3108
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Publish nostr-protocol to PyPI

on: [workflow_dispatch]
on:
workflow_dispatch:
inputs:
dry-run:
description: "Compile without publish to PyPI"
type: boolean
default: false
required: true

jobs:
build-linux-x86_64:
Expand Down Expand Up @@ -48,7 +55,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 +73,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 +189,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: github.event.inputs.dry-run == 'false'
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/publish-sdk-python.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Publish nostr-sdk to PyPI

on: [workflow_dispatch]
on:
workflow_dispatch:
inputs:
dry-run:
description: "Compile without publish to PyPI"
type: boolean
default: false
required: true

jobs:
build-linux-x86_64:
Expand Down Expand Up @@ -48,7 +55,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 +73,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 +189,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: github.event.inputs.dry-run == 'false'
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down

0 comments on commit 5db3108

Please sign in to comment.