Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jgebal committed Jan 14, 2022
1 parent 7d846a1 commit 5b28231
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build, test, deploy documentation
on:
push:
branches: [ develop, feature/github_actions ]
branches: [ develop ]
tags:
- v*
pull_request:
branches: [ develop ]
workflow_dispatch:
Expand All @@ -14,6 +16,7 @@ defaults:

jobs:
build:
name: Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }}
runs-on: ubuntu-latest
env:
ORACLE_VERSION: "gvenzl/oracle-xe:18.4.0-slim"
Expand Down Expand Up @@ -73,18 +76,6 @@ jobs:
java-version: ${{matrix.jdk}}
cache: 'gradle'

- name: Display env
run: |
echo JAVA_HOME = ${JAVA_HOME}
echo UTPLSQL_FILE = ${UTPLSQL_FILE}
echo ORACLE_VERSION = ${ORACLE_VERSION}
echo PATH = ${PATH}
ls ${JAVA_HOME}
java -version
echo $JAVA_OPTS
echo $GRADLE_OPTS
echo GRADLE_HOME = ${GRADLE_HOME}
- name: Install utplsql
run: .travis/install_utplsql.sh

Expand All @@ -94,10 +85,33 @@ jobs:
- name: Build and test
run: ./gradlew check

deploy:
name: Deploy snapshot
needs: [ build ]
concurrency: deploy
runs-on: ubuntu-latest
if: |
github.repository == 'utPLSQL/utPLSQL-java-api' &&
github.base_ref == null &&
(github.ref == 'refs/heads/develop' || startsWith( github.ref, 'refs/tags/v' ) )
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
cache: 'gradle'
- name: Upload archives
env:
PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}}
run: ./gradlew uploadArchives

slack-workflow-status:
if: always()
name: Post Workflow Status To Slack
needs: [ build ]
needs: [ build, deploy ]
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notification
Expand Down

0 comments on commit 5b28231

Please sign in to comment.