Skip to content

Commit dc7f89d

Browse files
committed
android-release-artifact only trigger if AAR doesn't exist
1 parent e342a92 commit dc7f89d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/android-release-artifacts.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,24 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
check-if-aar-exists:
17+
name: check-if-aar-exists
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 10
20+
steps:
21+
- name: Check if this RC version is already in S3
22+
shell: bash
23+
run: |
24+
VERSION="${{ inputs.version }}"
25+
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar" | grep "200 OK"; then
26+
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}/executorch.aar"
27+
echo "Will skip build/upload"
28+
exit 1
29+
fi
30+
1631
build-aar:
1732
name: build-aar
33+
needs: check-if-aar-exists
1834
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
1935
with:
2036
runner: linux.2xlarge

0 commit comments

Comments
 (0)