File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 49
49
git config --local user.email "[email protected] "
50
50
git config --local user.name "Github Actions"
51
51
52
- - name : Iterate rc version
53
- run : npm version prerelease --preid=rc
54
-
55
52
- name : Check and update package.json version
56
53
run : |
57
54
# Get the current version from package.json
@@ -60,13 +57,16 @@ jobs:
60
57
# Check for matching npm versions
61
58
matching_rc_versions=$(npm view ${{ steps.get_package_info.outputs.package_name }} versions --json)
62
59
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"
65
62
npm version "$latest_rc_version" --allow-same-version
63
+ echo "Iterating over version: $latest_rc_version"
66
64
npm version prerelease --preid=rc
67
65
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"
69
68
fi
69
+
70
70
echo "Ready to publish: $(node -p "require('./package.json').version")"
71
71
72
72
# - name: Publish to npm
You can’t perform that action at this time.
0 commit comments