Skip to content

Commit

Permalink
android-release-artifact only trigger if AAR doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklandsign committed Oct 15, 2024
1 parent e342a92 commit dc7f89d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/android-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ concurrency:
cancel-in-progress: true

jobs:
check-if-aar-exists:
name: check-if-aar-exists
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Check if this RC version is already in S3
shell: bash
run: |
VERSION="${{ inputs.version }}"
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar" | grep "200 OK"; then
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar"
echo "Will skip build/upload"
exit 1
fi
build-aar:
name: build-aar
needs: check-if-aar-exists
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.2xlarge
Expand Down

0 comments on commit dc7f89d

Please sign in to comment.