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