Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b28231

Browse files
committed
1 parent 7d846a1 commit 5b28231

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

.github/workflows/build.yml

+28-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Build, test, deploy documentation
22
on:
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

1517
jobs:
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"
@@ -73,18 +76,6 @@ jobs:
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

Comments
 (0)