Skip to content

Commit 729eb60

Browse files
committed
Added release.yml
1 parent b8e3c9b commit 729eb60

File tree

2 files changed

+56
-4
lines changed

2 files changed

+56
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: Build
22

3-
# Controls when the workflow will run
43
on:
5-
# Triggers the workflow on push or pull request events but only for the develop branch
64
push:
75
branches: [ develop ]
86
pull_request:
97
branches: [ develop ]
108

11-
# Allows you to run this workflow manually from the Actions tab
129
workflow_dispatch:
1310

1411
jobs:
@@ -53,4 +50,4 @@ jobs:
5350
${{ runner.os }}-maven-
5451
5552
- name: Maven verify
56-
run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify
53+
run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
services:
13+
oracle:
14+
image: gvenzl/oracle-xe:18.4.0-slim
15+
env:
16+
ORACLE_PASSWORD: oracle
17+
ports:
18+
- 1521:1521
19+
options: >-
20+
--health-cmd healthcheck.sh
21+
--health-interval 10s
22+
--health-timeout 5s
23+
--health-retries 10
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- name: Install utPLSQL
29+
run: sh ${{ github.workspace }}/scripts/1_install_utplsql.sh
30+
31+
- name: Install demo project
32+
run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh
33+
34+
- name: Set up JDK 8
35+
uses: actions/setup-java@v2
36+
with:
37+
java-version: '8'
38+
distribution: 'adopt'
39+
server-id: ossrh
40+
server-username: MAVEN_USERNAME
41+
server-password: MAVEN_PASSWORD
42+
43+
- name: Cache local Maven repository
44+
uses: actions/cache@v2
45+
with:
46+
path: ~/.m2/repository
47+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
48+
restore-keys: |
49+
${{ runner.os }}-maven-
50+
51+
- name: Maven deploy to Maven Central
52+
run: mvn deploy -Prelease
53+
env:
54+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
55+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 commit comments

Comments
 (0)