diff --git a/.github/workflows/php80.yml b/.github/workflows/php80.yml index 25cfe9b..c6686f8 100644 --- a/.github/workflows/php80.yml +++ b/.github/workflows/php80.yml @@ -122,7 +122,11 @@ jobs: done assets+=("./scripts/Get-PhpNightly.ps1") assets+=("./scripts/Get-Php.ps1") - gh release delete "php8.0" -y || true - gh release create "php8.0" "${assets[@]}" -t "php8.0" -n "php8.0" + release='php8.0' + if ! gh release view "$release"; then + gh release create "$release" "${assets[@]}" -t "$release" -n "$release" + else + gh release upload "$release" "${assets[@]}" --clobber + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/phpmaster.yml b/.github/workflows/phpmaster.yml index f0310ff..f408edc 100644 --- a/.github/workflows/phpmaster.yml +++ b/.github/workflows/phpmaster.yml @@ -131,9 +131,12 @@ jobs: done assets+=("./scripts/Get-PhpNightly.ps1") assets+=("./scripts/Get-Php.ps1") - gh release delete "php8.1" -y || true - gh release create "php8.1" "${assets[@]}" -t "php8.1" -n "php8.1" - gh release delete "master" -y || true - gh release create "master" "${assets[@]}" -t "master" -n "master" + for release in php8.1 master; do + if ! gh release view "$release"; then + gh release create "$release" "${assets[@]}" -t "$release" -n "$release" + else + gh release upload "$release" "${assets[@]}" --clobber + fi + done env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}