File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -euo pipefail
4
4
5
+ GITHUB_OUTPUT=${GITHUB_OUTPUT:- }
6
+
5
7
if [[ $GITHUB_REF != " refs/tags/" * ]]; then
6
8
echo " ::warning::Skipping: This should only run on tags push or on release instead of '$GITHUB_EVENT_NAME '." ;
7
9
exit 0;
@@ -19,13 +21,26 @@ CURRENT_TAG=${3:-$(git tag -l --sort=-version:refname "$MAJOR_VERSION.*" | grep
19
21
if [[ -z $CURRENT_TAG ]]; then
20
22
echo " ::warning::Initial release detected unable to determine any tag diff."
21
23
echo " ::warning::Setting release_type to $INPUT_INITIAL_RELEASE_TYPE ."
22
- echo " ::set-output name=release_type::$INPUT_INITIAL_RELEASE_TYPE "
24
+
25
+ if [[ -z " $GITHUB_OUTPUT " ]]; then
26
+ echo " ::set-output name=release_type::$INPUT_INITIAL_RELEASE_TYPE "
27
+ else
28
+ echo " release_type=$INPUT_INITIAL_RELEASE_TYPE " >> " $GITHUB_OUTPUT "
29
+ fi
23
30
exit 0;
24
31
fi
25
32
26
33
echo " ::debug::Calculating diff..."
27
34
PART=$( wget -O - https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver | bash -s diff " ${CURRENT_TAG// v/ } " " ${NEW_TAG// v/ } " )
28
35
29
- echo " ::set-output name=release_type::$PART "
30
- echo " ::set-output name=old_version::$CURRENT_TAG "
31
- echo " ::set-output name=new_version::$NEW_TAG "
36
+ if [[ -z " $GITHUB_OUTPUT " ]]; then
37
+ echo " ::set-output name=release_type::$PART "
38
+ echo " ::set-output name=old_version::$CURRENT_TAG "
39
+ echo " ::set-output name=new_version::$NEW_TAG "
40
+ else
41
+ cat << EOF >> "$GITHUB_OUTPUT "
42
+ release_type=$PART
43
+ old_version=$CURRENT_TAG
44
+ new_version=$NEW_TAG
45
+ EOF
46
+ fi
You can’t perform that action at this time.
0 commit comments