xref: /aosp_15_r20/external/volley/publish-snapshot-on-commit.sh (revision a494ed5db247d14ea5602de4a744bb4a531fd3a7)
1*a494ed5dSAndroid Build Coastguard Workerset -eu
2*a494ed5dSAndroid Build Coastguard Worker
3*a494ed5dSAndroid Build Coastguard WorkerGITHUB_BRANCH=${GITHUB_REF#refs/heads/}
4*a494ed5dSAndroid Build Coastguard Worker
5*a494ed5dSAndroid Build Coastguard Workerif [ "$GITHUB_REPOSITORY" == "google/volley" ] && \
6*a494ed5dSAndroid Build Coastguard Worker   [ "$GITHUB_EVENT_NAME" == "push" ] && \
7*a494ed5dSAndroid Build Coastguard Worker   [ "$GITHUB_BRANCH" == "master" ]; then
8*a494ed5dSAndroid Build Coastguard Worker  echo -e "Publishing snapshot build...\n"
9*a494ed5dSAndroid Build Coastguard Worker
10*a494ed5dSAndroid Build Coastguard Worker  ./gradlew publish
11*a494ed5dSAndroid Build Coastguard Worker
12*a494ed5dSAndroid Build Coastguard Worker  echo -e "Published snapshot build"
13*a494ed5dSAndroid Build Coastguard Workerelse
14*a494ed5dSAndroid Build Coastguard Worker  echo -e "Not publishing snapshot"
15*a494ed5dSAndroid Build Coastguard Workerfi
16