Skip to content

Commit

Permalink
Merge pull request #142 from perfectsense/feature/github-actions
Browse files Browse the repository at this point in the history
Migrate to Github Actions
  • Loading branch information
deepanjan90 authored Feb 22, 2022
2 parents d6aeeef + 122b504 commit 919873f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 19 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/gyro-azure-provider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: gyro-azure-provider

on:
push:
branches:
- master
- release/*

pull_request:
branches:
- master
- release/*

env:
GITHUB_ACTIONS_PULL_REQUEST: ${{ github.event.pull_request.number }}
GRADLE_DEPLOY_USER: ${{ secrets.GRADLE_DEPLOY_USER }}
GRADLE_DEPLOY_PASSWORD: ${{ secrets.GRADLE_DEPLOY_PASSWORD }}

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ plugins {
def releaseVersion = '0.99.3'
def releaseBuild = false;

if (System.getenv('TRAVIS_BRANCH') && System.getenv('TRAVIS_PULL_REQUEST') == 'false') {
if (System.getenv('CI')) {
defaultTasks 'build', 'publish'

releaseBuild = System.getenv('TRAVIS_BRANCH').startsWith("release/");
releaseBuild = System.getenv('GITHUB_ACTIONS_PULL_REQUEST') == '' &&
System.getenv('GITHUB_REF').startsWith("refs/head/release/");
} else {
defaultTasks 'build', 'publishToMavenLocal'
}
Expand Down

0 comments on commit 919873f

Please sign in to comment.