Skip to content

Commit ae4e9e4

Browse files
authored
Merge pull request #124 from sswguo/workflow
Update the github workflow
2 parents 050dea4 + fae522c commit ae4e9e4

File tree

3 files changed

+67
-104
lines changed

3 files changed

+67
-104
lines changed

.github/workflows/maven-build.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# Copyright (C) 2012-2024 Red Hat, Inc. (https://github.com/Commonjava/path-mapped-storage)
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
name: build on maven
18+
19+
on:
20+
watch:
21+
types: [started]
22+
pull_request:
23+
types: [opened, reopened, edited, synchronize, ready_for_review]
24+
push:
25+
branches:
26+
- main
27+
- master
28+
29+
workflow_dispatch:
30+
31+
jobs:
32+
build:
33+
name: Build with maven
34+
runs-on: ubuntu-latest
35+
env:
36+
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Set up JDK 11 for x64
41+
uses: actions/setup-java@v3
42+
with:
43+
java-version: '11'
44+
distribution: 'temurin'
45+
architecture: x64
46+
47+
- uses: s4u/[email protected]
48+
with:
49+
sonatypeSnapshots: true
50+
51+
- name: Build the Maven verify phase
52+
run: mvn -B -V clean verify -Prun-its -Pci
53+
54+
55+
- uses: s4u/[email protected]
56+
if: ${{ github.event_name == 'push' }}
57+
with:
58+
servers: |
59+
[{
60+
"id": "central-portal-snapshots",
61+
"username": "${{ secrets.SONATYPE_BOT_USERNAME }}",
62+
"password": "${{ secrets.SONATYPE_BOT_TOKEN }}"
63+
}]
64+
65+
- name: Deploy the artifact
66+
if: ${{ github.event_name == 'push' }}
67+
run: mvn help:effective-settings -B -V clean deploy -e

.github/workflows/merge-build.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/pr-build.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)