Skip to content

Commit 5ea1228

Browse files
authored
chore: check for existing release instead of manifest version (#60)
1 parent 265f949 commit 5ea1228

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/release-please.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ jobs:
3737
with:
3838
ref: ${{ steps.vars.outputs.branch }}
3939

40-
- name: Check if version already released
40+
- name: Check if release already exists
4141
id: check
42+
env:
43+
GH_TOKEN: ${{ github.token }}
4244
run: |
43-
TARGET="${{ steps.vars.outputs.version }}"
44-
CURRENT=$(jq -r '."."' .github/.release-please-manifest.json)
45-
if [ "$CURRENT" == "$TARGET" ]; then
46-
echo "Version $TARGET already released, skipping"
45+
VERSION="${{ steps.vars.outputs.version }}"
46+
if gh release view "v$VERSION" --repo ${{ github.repository }} &>/dev/null; then
47+
echo "Release v$VERSION already exists, skipping"
4748
echo "skip=true" >> $GITHUB_OUTPUT
4849
else
4950
echo "skip=false" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)