You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ "${{ env.VERSION }}" != "${PHP_VERSION}" ]]; then
72
74
echo "Version '${{ env.VERSION }}' does not match the version in wp-parsely.php."
73
75
echo "Did you mean '${PHP_VERSION}'?"
76
+
echo "::error file=wp-parsely.php,title=Validate Version::Version '${{ env.VERSION }}' does not match the version in wp-parsely.php (${PHP_VERSION})."
74
77
exit 1
75
78
fi
76
79
if [[ "${{ env.VERSION }}" != "${JSON_VERSION}" ]]; then
77
80
echo "Version '${{ env.VERSION }}' does not match the version in package.json."
78
81
echo "Did you mean '${JSON_VERSION}'?"
82
+
echo "::error file=package.json,title=Validate Version::Version '${{ env.VERSION }}' does not match the version in package.json (${JSON_VERSION})."
79
83
exit 1
80
84
fi
81
85
82
86
- name: Check if the version is in the CHANGELOG.md file
83
87
run: |
84
88
if ! grep -q "## \[${{ env.VERSION }}\]" CHANGELOG.md; then
85
89
echo "Version '${{ env.VERSION }}' is not in the CHANGELOG.md file."
86
-
exit 1
90
+
91
+
if ${{ env.DRY_RUN }}; then
92
+
echo "::warning file=CHANGELOG.md,title=Validate Version::Version '${{ env.VERSION }}' is not in the CHANGELOG.md file. The dry-run will proceed with an empty changelog entry."
93
+
else
94
+
echo "::error file=CHANGELOG.md,title=Validate Version::Version '${{ env.VERSION }}' is not in the CHANGELOG.md file."
95
+
exit 1
96
+
fi
87
97
fi
88
98
89
99
- name: Check if the version was already released
90
-
if: ${{ env.DRY_RUN == false }}
100
+
if: ${{ env.DRY_RUN == 'false' }}
91
101
run: |
92
102
if git tag --list | grep -q "${{ env.VERSION }}"; then
93
103
echo "Version '${{ env.VERSION }}' has already been released."
104
+
echo "::error title=Validate Version::Version '${{ env.VERSION }}' has already been released."
echo "::warning file=CHANGELOG.md,title=Extract Changelog::Version '${VERSION}' not found in CHANGELOG.md. The dry-run will proceed with an empty changelog entry."
173
+
echo -e "\nThere is no available changelog entry for the dry-run." > release_notes.md
174
+
exit 0
175
+
else
176
+
echo "::error file=CHANGELOG.md,title=Extract Changelog::Version '${VERSION}' not found in CHANGELOG.md"
0 commit comments