11name : Build, test, deploy documentation
22on :
33 push :
4- branches : [ develop, feature/github_actions ]
4+ branches : [ develop ]
5+ tags :
6+ - v*
57 pull_request :
68 branches : [ develop ]
79 workflow_dispatch :
@@ -14,6 +16,7 @@ defaults:
1416
1517jobs :
1618 build :
19+ name : Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }}
1720 runs-on : ubuntu-latest
1821 env :
1922 ORACLE_VERSION : " gvenzl/oracle-xe:18.4.0-slim"
7376 java-version : ${{matrix.jdk}}
7477 cache : ' gradle'
7578
76- - name : Display env
77- run : |
78- echo JAVA_HOME = ${JAVA_HOME}
79- echo UTPLSQL_FILE = ${UTPLSQL_FILE}
80- echo ORACLE_VERSION = ${ORACLE_VERSION}
81- echo PATH = ${PATH}
82- ls ${JAVA_HOME}
83- java -version
84- echo $JAVA_OPTS
85- echo $GRADLE_OPTS
86- echo GRADLE_HOME = ${GRADLE_HOME}
87-
8879 - name : Install utplsql
8980 run : .travis/install_utplsql.sh
9081
@@ -94,10 +85,33 @@ jobs:
9485 - name : Build and test
9586 run : ./gradlew check
9687
88+ deploy :
89+ name : Deploy snapshot
90+ needs : [ build ]
91+ concurrency : deploy
92+ runs-on : ubuntu-latest
93+ if : |
94+ github.repository == 'utPLSQL/utPLSQL-java-api' &&
95+ github.base_ref == null &&
96+ (github.ref == 'refs/heads/develop' || startsWith( github.ref, 'refs/tags/v' ) )
97+ steps :
98+ - uses : actions/checkout@v2
99+ with :
100+ fetch-depth : 0
101+ - uses : actions/setup-java@v2
102+ with :
103+ distribution : ' adopt'
104+ java-version : ' 8'
105+ cache : ' gradle'
106+ - name : Upload archives
107+ env :
108+ PACKAGECLOUD_TOKEN : ${{secrets.PACKAGECLOUD_TOKEN}}
109+ run : ./gradlew uploadArchives
110+
97111 slack-workflow-status :
98112 if : always()
99113 name : Post Workflow Status To Slack
100- needs : [ build ]
114+ needs : [ build, deploy ]
101115 runs-on : ubuntu-latest
102116 steps :
103117 - name : Slack Workflow Notification
0 commit comments