-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Travis CI to GitHub Actions. (#381)
* Migrate from Travis CI to GitHub Actions. Travis CI is moving to billed plans per https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing. Volley's requirements are simple and should work fine with GitHub Actions, which would hopefully be supported as long as GitHub itself is. Co-authored-by: Joe Bowbeer <joe.bowbeer@gmail.com>
- Loading branch information
1 parent
bdc0e39
commit cd08391
Showing
3 changed files
with
34 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Gradle | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
- name: Build with Gradle | ||
run: ./gradlew --continue verifyGoogleJavaFormat build connectedCheck | ||
- name: Publish snapshot | ||
if: github.event_name == 'push' | ||
env: | ||
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | ||
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | ||
run: ./publish-snapshot-on-commit.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
set -eu | ||
|
||
if [ "$TRAVIS_REPO_SLUG" == "google/volley" ] && \ | ||
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \ | ||
[ "$TRAVIS_BRANCH" == "master" ]; then | ||
GITHUB_BRANCH=${GITHUB_REF#refs/heads/} | ||
|
||
if [ "$GITHUB_REPOSITORY" == "google/volley" ] && \ | ||
[ "$GITHUB_EVENT_NAME" == "push" ] && \ | ||
[ "$GITHUB_BRANCH" == "master" ]; then | ||
echo -e "Publishing snapshot build to OJO...\n" | ||
|
||
./gradlew artifactoryPublish | ||
|
||
echo -e "Published snapshot build to OJO" | ||
else | ||
echo -e "Not publishing snapshot" | ||
fi | ||
fi |