1
1
name : Build, test, deploy documentation
2
2
on :
3
3
push :
4
- branches : [ develop, feature/github_actions ]
4
+ branches : [ develop ]
5
+ tags :
6
+ - v*
5
7
pull_request :
6
8
branches : [ develop ]
7
9
workflow_dispatch :
@@ -14,6 +16,7 @@ defaults:
14
16
15
17
jobs :
16
18
build :
19
+ name : Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }}
17
20
runs-on : ubuntu-latest
18
21
env :
19
22
ORACLE_VERSION : " gvenzl/oracle-xe:18.4.0-slim"
73
76
java-version : ${{matrix.jdk}}
74
77
cache : ' gradle'
75
78
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
-
88
79
- name : Install utplsql
89
80
run : .travis/install_utplsql.sh
90
81
@@ -94,10 +85,33 @@ jobs:
94
85
- name : Build and test
95
86
run : ./gradlew check
96
87
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
+
97
111
slack-workflow-status :
98
112
if : always()
99
113
name : Post Workflow Status To Slack
100
- needs : [ build ]
114
+ needs : [ build, deploy ]
101
115
runs-on : ubuntu-latest
102
116
steps :
103
117
- name : Slack Workflow Notification
0 commit comments