Skip to content

Commit aaaea71

Browse files
committed
chore: adding verbosity options to the ci
1 parent b7547e8 commit aaaea71

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ on:
99
branches: [main]
1010
workflow_dispatch:
1111
inputs:
12-
paths_released:
13-
description: "JSON array of package paths to publish (e.g. [\"packages/r2x-plexos-to-sienna\"])"
12+
release_target:
13+
description: "Package to publish"
1414
required: true
15-
type: string
15+
type: choice
16+
options:
17+
- r2x
18+
- packages/r2x-plexos-to-sienna
19+
- packages/r2x-reeds-to-plexos
20+
- packages/r2x-reeds-to-sienna
21+
- packages/r2x-sienna-to-plexos
1622

1723
concurrency:
1824
group: release
@@ -77,13 +83,12 @@ jobs:
7783
env:
7884
EVENT_NAME: ${{ github.event_name }}
7985
AUTO_PATHS_RELEASED: ${{ needs.release-please.outputs.paths_released }}
80-
MANUAL_PATHS_RELEASED: ${{ inputs.paths_released }}
86+
MANUAL_RELEASE_TARGET: ${{ inputs.release_target }}
8187
run: |
8288
set -euo pipefail
8389
8490
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
85-
paths="$MANUAL_PATHS_RELEASED"
86-
echo "$paths" | jq -e '. | type == "array" and all(.[]; type == "string" and (. == "." or startswith("packages/")))' >/dev/null
91+
paths="$(jq -cn --arg target "$MANUAL_RELEASE_TARGET" '[$target]')"
8792
else
8893
paths="$AUTO_PATHS_RELEASED"
8994
fi
@@ -99,7 +104,7 @@ jobs:
99104
100105
packages=""
101106
for path in $(echo "$PATHS_RELEASED" | jq -r '.[]'); do
102-
[[ "$path" == "." ]] && pkg="r2x" || pkg=$(basename "$path")
107+
[[ "$path" == "." || "$path" == "r2x" ]] && pkg="r2x" || pkg=$(basename "$path")
103108
packages="${packages:+$packages }$pkg"
104109
done
105110
@@ -145,3 +150,4 @@ jobs:
145150
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
146151
with:
147152
packages-dir: dist/
153+
verbose: true

0 commit comments

Comments
 (0)