check
This commit is contained in:
@@ -28,22 +28,24 @@ jobs:
|
|||||||
exit 0 # Exit successfully, but do nothing.
|
exit 0 # Exit successfully, but do nothing.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract the tag name and published date of the latest release
|
echo "${API_OUTPUT}"
|
||||||
LATEST_TAG=$(echo "${API_OUTPUT}" | jq -r '.[0].tag_name')
|
|
||||||
PUBLISH_DATE=$(echo "${API_OUTPUT}" | jq -r '.[0].published_at')
|
|
||||||
|
|
||||||
echo "✅ Found latest version: ${LATEST_TAG} published on ${PUBLISH_DATE}"
|
# # Extract the tag name and published date of the latest release
|
||||||
|
# LATEST_TAG=$(echo "${API_OUTPUT}" | jq -r '.[0].tag_name')
|
||||||
|
# PUBLISH_DATE=$(echo "${API_OUTPUT}" | jq -r '.[0].published_at')
|
||||||
|
|
||||||
# --- 2. Implement your custom logic here ---
|
# echo "✅ Found latest version: ${LATEST_TAG} published on ${PUBLISH_DATE}"
|
||||||
# You need a mechanism to store the previously checked tag/date
|
|
||||||
# For simplicity, we will just check if we found ANY release data.
|
|
||||||
|
|
||||||
# Example Logic: If you want to perform an action ONLY IF the date is new...
|
# # --- 2. Implement your custom logic here ---
|
||||||
# (In a real scenario, you would compare $PUBLISH_DATE against a stored variable)
|
# # You need a mechanism to store the previously checked tag/date
|
||||||
|
# # For simplicity, we will just check if we found ANY release data.
|
||||||
|
|
||||||
echo "Successfully retrieved version data."
|
# # Example Logic: If you want to perform an action ONLY IF the date is new...
|
||||||
# echo "LATEST_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
|
# # (In a real scenario, you would compare $PUBLISH_DATE against a stored variable)
|
||||||
echo "LATEST_VERSION=${LATEST_TAG}"
|
|
||||||
|
# echo "Successfully retrieved version data."
|
||||||
|
# # echo "LATEST_VERSION=${LATEST_TAG}" >> $GITHUB_ENV
|
||||||
|
# echo "LATEST_VERSION=${LATEST_TAG}"
|
||||||
|
|
||||||
# - name: Deploy/Build action if release found
|
# - name: Deploy/Build action if release found
|
||||||
# if: env.LATEST_VERSION # This step runs ONLY if the previous step successfully set LATEST_VERSION
|
# if: env.LATEST_VERSION # This step runs ONLY if the previous step successfully set LATEST_VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user