Spaces:
Running
Running
try to gracefully bail
Browse files
.github/workflows/release.yaml
CHANGED
@@ -35,12 +35,12 @@ jobs:
|
|
35 |
VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
|
36 |
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
37 |
|
38 |
-
# Step 5: Check if tag
|
39 |
-
- name: Check if tag exists
|
40 |
id: check_tag
|
41 |
run: |
|
42 |
-
if git
|
43 |
-
echo "Tag v${{ env.VERSION }} already exists."
|
44 |
exit 0
|
45 |
fi
|
46 |
|
|
|
35 |
VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
|
36 |
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
37 |
|
38 |
+
# Step 5: Check if tag exists on remote
|
39 |
+
- name: Check if tag exists on remote
|
40 |
id: check_tag
|
41 |
run: |
|
42 |
+
if git ls-remote --tags origin | grep "refs/tags/v${{ env.VERSION }}"; then
|
43 |
+
echo "Tag v${{ env.VERSION }} already exists on remote."
|
44 |
exit 0
|
45 |
fi
|
46 |
|