Skip to content

Commit 570ba6a

Browse files
authored
Add tag existence check in release workflow and update zip file creation process (#278)
1 parent 1382dcd commit 570ba6a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ jobs:
5555
fi
5656
echo "Version format valid: $TAG"
5757
58+
- name: Check tag does not exist
59+
run: |
60+
git fetch --tags
61+
if git tag -l | grep -q "^${TAG}$"; then
62+
echo "ERROR: Tag $TAG already exists" >&2
63+
exit 1
64+
fi
65+
echo "Tag $TAG does not exist. Proceeding..."
66+
5867
- name: Xcode version
5968
run: |
6069
xcodebuild -version
@@ -76,7 +85,9 @@ jobs:
7685
7786
- name: Create zip file
7887
run: |
79-
zip -r -X "${OUTPUT_DIR}/${ZIP_NAME}" "${OUTPUT_DIR}/${XCFRAMEWORK_NAME}" LICENSE
88+
cp LICENSE "${OUTPUT_DIR}/"
89+
cd "${OUTPUT_DIR}"
90+
zip -r -X "${ZIP_NAME}" "${XCFRAMEWORK_NAME}" LICENSE
8091
8192
- name: Compute checksum
8293
id: checksum

0 commit comments

Comments
 (0)