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 [ ${{ github.event.inputs.release_candidate }} == 'true' ]; then
81
-
echo "* Attempting a ${{ github.event.inputs.part }} version release candidate bump from ${current_tag} to: ${{ github.event.inputs.new_version }}"
82
+
if [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]; then
83
+
echo "* Attempting a ${GITHUB_EVENT_INPUTS_PART} version release candidate bump from ${current_tag} to: ${GITHUB_EVENT_INPUTS_NEW_VERSION}"
82
84
else
83
85
# For ease of use, set current tag to latest stable
84
86
current_tag="${latest_stable_tag}"
85
87
86
-
echo "* Attempting a ${{ github.event.inputs.part }} version bump from ${current_tag} to: ${{ github.event.inputs.new_version }}"
88
+
echo "* Attempting a ${GITHUB_EVENT_INPUTS_PART} version bump from ${current_tag} to: ${GITHUB_EVENT_INPUTS_NEW_VERSION}"
87
89
fi
88
90
89
91
echo "* Validating bump target version matches SemVer..."
@@ -102,7 +104,7 @@ jobs:
102
104
103
105
# IFS is single charecter, so split on the 'r' in "rc"
104
106
IFS='r' read bump_version bump_rc <<EOF
105
-
${{ github.event.inputs.new_version }}
107
+
${GITHUB_EVENT_INPUTS_NEW_VERSION}
106
108
EOF
107
109
bump_rc="${bump_rc:1}"
108
110
@@ -113,87 +115,91 @@ jobs:
113
115
unset bump_version
114
116
115
117
# Check release candidates are valid before proceeding
116
-
if [ ${{ github.event.inputs.release_candidate }} == 'true' ]; then
118
+
if [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]; then
117
119
if [ -z "${current_rc}" ]; then
118
120
current_rc=0
119
121
fi
120
122
if [ "${bump_rc}" != "$((${current_rc} + 1))" ]; then
121
-
echo "ERROR: ${{ github.event.inputs.new_version }} is more than 1 release candidate version greater then ${current_tag}"
123
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_NEW_VERSION} is more than 1 release candidate version greater then ${current_tag}"
122
124
exit 1
123
125
fi
124
126
else
125
127
if [ ! -z "${bump_rc}" ]; then
126
-
echo "ERROR: ${{ github.event.inputs.new_version }} contains a release candidate signature rc${bump_rc} but was marked as stable release."
128
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_NEW_VERSION} contains a release candidate signature rc${bump_rc} but was marked as stable release."
127
129
exit 1
128
130
fi
129
131
fi
130
132
131
-
if [ ${{ github.event.inputs.part }} == "major" ]; then
133
+
if [ ${GITHUB_EVENT_INPUTS_PART} == "major" ]; then
132
134
# Minor version should be zero
133
135
if [ "${bump_minor}" != "0" ]; then
134
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, ${{ github.event.inputs.new_version }} minor version should equal 0."
136
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, ${GITHUB_EVENT_INPUTS_NEW_VERSION} minor version should equal 0."
135
137
exit 1
136
138
fi
137
139
# Patch version should be zero
138
140
if [ "${bump_patch}" != "0" ]; then
139
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, ${{ github.event.inputs.new_version }} patch version should equal 0."
141
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, ${GITHUB_EVENT_INPUTS_NEW_VERSION} patch version should equal 0."
140
142
exit 1
141
143
fi
142
144
if [ "${bump_major}" != "$((${current_major} + 1))" ]; then
143
-
if ! ([ "${bump_major}" == "${current_major}" ] && [ ${{ github.event.inputs.release_candidate }} == 'true' ]); then
144
-
echo "ERROR: ${{ github.event.inputs.part }} release candidate release attempted, but ${{ github.event.inputs.new_version }} is more than 1 ${{ github.event.inputs.part }} version greater then ${current_tag}."
145
+
if ! ([ "${bump_major}" == "${current_major}" ] && [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]); then
146
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release candidate release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} is more than 1 ${GITHUB_EVENT_INPUTS_PART} version greater then ${current_tag}."
145
147
exit 1
146
148
fi
147
149
fi
148
150
fi
149
151
150
-
if [ ${{ github.event.inputs.part }} == "minor" ]; then
152
+
if [ ${GITHUB_EVENT_INPUTS_PART} == "minor" ]; then
151
153
# Major versions should be equal
152
154
if [ "${bump_major}" != "${current_major}" ]; then
153
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, but ${{ github.event.inputs.new_version }} major version not equal to ${current_tag}."
155
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} major version not equal to ${current_tag}."
154
156
exit 1
155
157
fi
156
158
# Patch version should be zero
157
159
if [ "${bump_patch}" != "0" ]; then
158
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, ${{ github.event.inputs.new_version }} patch version should equal 0."
160
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, ${GITHUB_EVENT_INPUTS_NEW_VERSION} patch version should equal 0."
159
161
exit 1
160
162
fi
161
163
if [ "${bump_minor}" != "$((${current_minor} + 1))" ]; then
162
-
if ! ([ "${bump_minor}" == "${current_minor}" ] && [ ${{ github.event.inputs.release_candidate }} == 'true' ]); then
163
-
echo "ERROR: ${{ github.event.inputs.part }} release candidate release attempted, but ${{ github.event.inputs.new_version }} is more than 1 ${{ github.event.inputs.part }} version greater then ${current_tag}."
164
+
if ! ([ "${bump_minor}" == "${current_minor}" ] && [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]); then
165
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release candidate release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} is more than 1 ${GITHUB_EVENT_INPUTS_PART} version greater then ${current_tag}."
164
166
exit 1
165
167
fi
166
168
fi
167
169
fi
168
170
169
-
if [ ${{ github.event.inputs.part }} == "patch" ]; then
171
+
if [ ${GITHUB_EVENT_INPUTS_PART} == "patch" ]; then
170
172
# Major versions should be equal
171
173
if [ "${bump_major}" != "${current_major}" ]; then
172
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, but ${{ github.event.inputs.new_version }} major version not equal to ${current_tag}."
174
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} major version not equal to ${current_tag}."
173
175
exit 1
174
176
fi
175
177
# Minor versions should be equal
176
178
if [ "${bump_minor}" != "${current_minor}" ]; then
177
-
echo "ERROR: ${{ github.event.inputs.part }} release attempted, but ${{ github.event.inputs.new_version }} minor version not equal to ${current_tag}."
179
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} minor version not equal to ${current_tag}."
178
180
exit 1
179
181
fi
180
182
if [ "${bump_patch}" != "$((${current_patch} + 1))" ]; then
181
-
if ! ([ "${bump_patch}" == "${current_patch}" ] && [ ${{ github.event.inputs.release_candidate }} == 'true' ]); then
182
-
echo "ERROR: ${{ github.event.inputs.part }} release candidate release attempted, but ${{ github.event.inputs.new_version }} is more than 1 ${{ github.event.inputs.part }} version greater then ${current_tag}."
183
+
if ! ([ "${bump_patch}" == "${current_patch}" ] && [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]); then
184
+
echo "ERROR: ${GITHUB_EVENT_INPUTS_PART} release candidate release attempted, but ${GITHUB_EVENT_INPUTS_NEW_VERSION} is more than 1 ${GITHUB_EVENT_INPUTS_PART} version greater then ${current_tag}."
183
185
exit 1
184
186
fi
185
187
fi
186
188
fi
187
189
188
190
echo " ...version bump validated!"
189
-
if [ ${{ github.event.inputs.release_candidate }} == 'true' ]; then
190
-
echo "* Bumping version ${current_tag} to ${{ github.event.inputs.part }} version release candidate ${{ github.event.inputs.new_version }}"
191
+
if [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]; then
192
+
echo "* Bumping version ${current_tag} to ${GITHUB_EVENT_INPUTS_PART} version release candidate ${GITHUB_EVENT_INPUTS_NEW_VERSION}"
191
193
else
192
-
echo "* Bumping version ${current_tag} to ${{ github.event.inputs.part }} version ${{ github.event.inputs.new_version }}"
194
+
echo "* Bumping version ${current_tag} to ${GITHUB_EVENT_INPUTS_PART} version ${GITHUB_EVENT_INPUTS_NEW_VERSION}"
if [ ${{ github.event.inputs.release_candidate }} == 'true' ]; then
249
-
git tag "${NEW_TAG}" "${NEW_TAG}"^{} -f -m "$(printf "This is a ${{ github.event.inputs.part }} release candidate from ${OLD_TAG} → ${NEW_TAG}.\n\nChanges:\n${CHANGES_NEWLINE}")"
256
+
if [ ${GITHUB_EVENT_INPUTS_RELEASE_CANDIDATE} == 'true' ]; then
257
+
git tag "${NEW_TAG}" "${NEW_TAG}"^{} -f -m "$(printf "This is a ${GITHUB_EVENT_INPUTS_PART} release candidate from ${OLD_TAG} → ${NEW_TAG}.\n\nChanges:\n${CHANGES_NEWLINE}")"
250
258
else
251
-
git tag "${NEW_TAG}" "${NEW_TAG}"^{} -f -m "$(printf "This is a ${{ github.event.inputs.part }} release from ${OLD_TAG} → ${NEW_TAG}.\n\nChanges:\n${CHANGES_NEWLINE}")"
259
+
git tag "${NEW_TAG}" "${NEW_TAG}"^{} -f -m "$(printf "This is a ${GITHUB_EVENT_INPUTS_PART} release from ${OLD_TAG} → ${NEW_TAG}.\n\nChanges:\n${CHANGES_NEWLINE}")"
0 commit comments