Skip to content

Commit 7498008

Browse files
authored
add retry for GH release creation (#79)
1 parent 8e30165 commit 7498008

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,19 @@ jobs:
173173
if: ${{ github.event.inputs.dry_run == false }}
174174
uses: pypa/gh-action-pypi-publish@release/v1
175175

176-
- name: Push & Create Release
176+
- name: Push
177177
if: ${{ github.event.inputs.dry_run == false }}
178178
run: |
179179
git push --force-with-lease
180180
git push --atomic origin localstack $NEW_VERSION
181-
# Wait a few seconds to avoid "gh release create" fail because the tag is not yet available
182-
sleep 10
183-
gh release create $NEW_VERSION --notes "automatic rebase sync and release"
184181
env:
185182
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183+
184+
# Add a retry to avoid issues where the GH CLI fails
185+
# because it does not yet detect the pushed tag.
186+
- name: Create Release
187+
uses: nick-fields/retry@v3
188+
with:
189+
max_attempts: 5
190+
retry_wait_seconds: 120
191+
command: gh release create $NEW_VERSION --notes "automatic rebase sync and release"

0 commit comments

Comments
 (0)