Skip to content

Commit 957901b

Browse files
committed
manage versions better - expect user to still manually bump version
1 parent 79bc82d commit 957901b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/publish-rc.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ jobs:
4949
git config --local user.email "[email protected]"
5050
git config --local user.name "Github Actions"
5151
52-
- name: Iterate rc version
53-
run: npm version prerelease --preid=rc
54-
5552
- name: Check and update package.json version
5653
run: |
5754
# Get the current version from package.json
@@ -60,13 +57,16 @@ jobs:
6057
# Check for matching npm versions
6158
matching_rc_versions=$(npm view ${{ steps.get_package_info.outputs.package_name }} versions --json)
6259
if [ "$(echo "$matching_rc_versions" | jq 'type')" == '"array"' ]; then
63-
latest_rc_version=$(echo "$matching_rc_versions" | jq -r '.[-1]') # Get the latest rc version
64-
echo "$latest_rc_version" # Output the last version
60+
latest_rc_version=$(echo "$matching_rc_versions" | jq -r '.[-1]')
61+
echo "Catching version up to latest rc: $latest_rc_version"
6562
npm version "$latest_rc_version" --allow-same-version
63+
echo "Iterating over version: $latest_rc_version"
6664
npm version prerelease --preid=rc
6765
else
68-
echo "No matching rc versions found."
66+
echo "No matching rc versions found. Initializing version $PACKAGE_BASE_VERSION-rc.0"
67+
npm version "$PACKAGE_BASE_VERSION-rc.0"
6968
fi
69+
7070
echo "Ready to publish: $(node -p "require('./package.json').version")"
7171
7272
# - name: Publish to npm

0 commit comments

Comments
 (0)