1616 package :
1717 description : ' Package names (comma separated) or "all"'
1818 required : false
19- default : ' core'
19+ default : ' core;pino-serializer '
2020 type : string
2121 publish :
2222 description : ' Publish destination'
5858 run : |
5959 set -euo pipefail
6060 BUMP_TYPE="${{ github.event.inputs.bump }}"
61-
61+
6262 if [ "$BUMP_TYPE" = "none" ]; then
6363 NEW_VER=$(jq -r .version package.json)
6464 echo "Skipping version bump. Current: $NEW_VER"
6868 NEW_VER=$(jq -r .version package.json)
6969 echo "Bumped to new version: $NEW_VER"
7070 fi
71-
71+
7272 echo "BUMP_TYPE=$BUMP_TYPE" >> $GITHUB_ENV
7373 echo "NEW_VERSION=$NEW_VER" >> $GITHUB_ENV
7474
9090 set -euo pipefail
9191 git config user.name "github-actions[bot]"
9292 git config user.email "github-actions[bot]@users.noreply.github.com"
93-
93+
9494 if git status --porcelain | grep -q . ; then
9595 BRANCH_NAME="bump-version/${NEW_VERSION}"
9696 git checkout -B "$BRANCH_NAME"
@@ -106,16 +106,16 @@ jobs:
106106 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107107 run : |
108108 set -euo pipefail
109-
109+
110110 # Create Pull Request using GitHub CLI
111111 PR_URL=$(gh pr create \
112112 --title "chore(release): v${NEW_VERSION}" \
113113 --body "Automated version bump to ${NEW_VERSION}" \
114114 --base "main" \
115115 --head "${PUSHED_BRANCH}")
116-
116+
117117 echo "Created PR: $PR_URL"
118-
118+
119119 # Auto-merge if requested
120120 if [ "${{ github.event.inputs.auto_merge }}" = "true" ]; then
121121 # --auto: waits for status checks to pass before merging
@@ -132,14 +132,14 @@ jobs:
132132 run : |
133133 set -euo pipefail
134134 PUBLISH_TARGET="${{ github.event.inputs.publish }}"
135-
135+
136136 # Initialize .npmrc
137137 : > ~/.npmrc
138-
138+
139139 if [[ "$PUBLISH_TARGET" == "both" || "$PUBLISH_TARGET" == "github" ]]; then
140140 printf "//npm.pkg.github.com/:_authToken=%s\n" "${GH_PACKAGES_PAT}" >> ~/.npmrc
141141 fi
142-
142+
143143 if [[ "$PUBLISH_TARGET" == "both" || "$PUBLISH_TARGET" == "npmjs" ]]; then
144144 printf "//registry.npmjs.org/:_authToken=%s\n" "${NPM_TOKEN}" >> ~/.npmrc
145145 fi
@@ -149,22 +149,22 @@ jobs:
149149 run : |
150150 # Continue on error to attempt publishing all selected packages
151151 set -u -o pipefail
152-
152+
153153 PKG_INPUT="${{ github.event.inputs.package }}"
154154 PUBLISH_TARGET="${{ github.event.inputs.publish }}"
155-
155+
156156 # Define registry URLs
157157 NPMJS_REG="https://registry.npmjs.org/"
158158 GPR_REG="https://npm.pkg.github.com/"
159-
159+
160160 publish_cmd() {
161161 local dir=$1
162162 local reg_url=$2
163163 echo "Publishing $dir to $reg_url..."
164164 # Try bun publish, fallback to npm if it fails
165165 (cd "$dir" && bun publish --registry="$reg_url") || (cd "$dir" && npm publish --registry="$reg_url")
166166 }
167-
167+
168168 # Logic for "all" or specific list
169169 if [ "$PKG_INPUT" = "all" ]; then
170170 TARGETS=$(ls -d packages/*)
@@ -173,7 +173,7 @@ jobs:
173173 TARGETS=""
174174 for i in "${ADDR[@]}"; do TARGETS+=" packages/${i// /}"; done
175175 fi
176-
176+
177177 for D in $TARGETS; do
178178 if [ -d "$D" ] && [ -f "$D/package.json" ]; then
179179 if [[ "$PUBLISH_TARGET" == "both" || "$PUBLISH_TARGET" == "npmjs" ]]; then
@@ -183,4 +183,4 @@ jobs:
183183 publish_cmd "$D" "$GPR_REG"
184184 fi
185185 fi
186- done
186+ done
0 commit comments