mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
build(ci): improve android build release upload reliability
- Add explicit contents: write permission for GITHUB_TOKEN - Increase wait time for release creation from 15 to 20 minutes - Add failure check if release is not found after waiting
This commit is contained in:
parent
6dcede853f
commit
e0031b1378
1 changed files with 11 additions and 2 deletions
13
.github/workflows/build-android.yml
vendored
13
.github/workflows/build-android.yml
vendored
|
|
@ -7,6 +7,9 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs: {}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -83,14 +86,20 @@ jobs:
|
|||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
echo "Waiting for main release to be created..."
|
||||
for i in {1..30}; do
|
||||
for i in {1..40}; do
|
||||
if gh release view ${{ github.ref_name }} --repo ${{ github.repository }} >/dev/null 2>&1; then
|
||||
echo "Release found!"
|
||||
break
|
||||
fi
|
||||
echo "Waiting for release... (attempt $i/30)"
|
||||
echo "Waiting for release... (attempt $i/40)"
|
||||
sleep 30
|
||||
done
|
||||
|
||||
# Fail if release still doesn't exist
|
||||
if ! gh release view ${{ github.ref_name }} --repo ${{ github.repository }} >/dev/null 2>&1; then
|
||||
echo "ERROR: Release ${{ github.ref_name }} was not created after 20 minutes"
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue