Skip to content

Commit

Permalink
Merge pull request #1418 from Netflix/use-github-actions
Browse files Browse the repository at this point in the history
Remove TravisCI and use Github Actions
  • Loading branch information
rpalcolea authored Aug 17, 2021
2 parents 6b0c7ca + c8d5702 commit 5e19bee
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 50 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/nebula-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CI"
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# test against JDK 8
java: [ 8 ]
name: CI with Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v1
- name: Setup jdk
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Build with Gradle
run: ./gradlew --info --stacktrace build
env:
CI_NAME: github_actions
CI_BUILD_NUMBER: ${{ github.sha }}
CI_BUILD_URL: 'https://github.com/${{ github.repository }}'
CI_BRANCH: ${{ github.ref }}
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Publish candidate/release to NetflixOSS and Maven Central"
on:
push:
tags:
- v*.*.*
- v*.*.*-rc.*
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup jdk 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Publish candidate
if: contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
- name: Publish release
if: (!contains(github.ref, '-rc.'))
run: ./gradlew --info -Prelease.useLastTag=true final
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
37 changes: 37 additions & 0 deletions .github/workflows/nebula-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Publish snapshot to NetflixOSS and Maven Central"

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- uses: actions/cache@v2
id: gradle-cache
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- uses: actions/cache@v2
id: gradle-wrapper-cache
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
- name: Build
run: ./gradlew build snapshot
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

25 changes: 0 additions & 25 deletions buildViaTravis.sh

This file was deleted.

7 changes: 0 additions & 7 deletions installViaTravis.sh

This file was deleted.

Binary file removed secrets/signing-key.enc
Binary file not shown.

0 comments on commit 5e19bee

Please sign in to comment.