Skip to content

Commit 90258de

Browse files
committed
maven central deployment prepared
1 parent 35bce12 commit 90258de

File tree

6 files changed

+440
-65
lines changed

6 files changed

+440
-65
lines changed

.github/settings.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<id>central</id>
8+
<username>${env.OSSRH_USERNAME}</username>
9+
<password>${env.OSSRH_PASSWORD}</password>
10+
</server>
11+
</servers>
12+
<profiles>
13+
<profile>
14+
<id>gpg-signing</id>
15+
<properties>
16+
<gpg.executable>gpg</gpg.executable>
17+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
18+
</properties>
19+
</profile>
20+
</profiles>
21+
<activeProfiles>
22+
<activeProfile>gpg-signing</activeProfile>
23+
</activeProfiles>
24+
</settings>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint GitHub Workflows
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
actionlint:
9+
name: Run actionlint
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Run actionlint
17+
uses: reviewdog/action-actionlint@v1
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
reporter: github-pr-check
21+
fail_level: any

.github/workflows/java-verify.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Verify java
2+
3+
on:
4+
# push:
5+
# branches: [ "main" ]
6+
7+
pull_request:
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Java
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: '21'
25+
cache: 'maven'
26+
server-id: central
27+
server-username: ${{ secrets.OSSRH_USERNAME }}
28+
server-password: ${{ secrets.OSSRH_PASSWORD }}
29+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
30+
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
31+
32+
- name: Dry run deployment
33+
run: |
34+
mvn deploy \
35+
--batch-mode \
36+
--settings .github/settings.xml \
37+
-DdryRun=true \
38+
-DskipSonaTypePublishing=true \
39+
-DskipTests \
40+
-P gpg-signing,cimodules,dev,release,sonatypeDeploy
41+
42+
env:
43+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
44+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
45+
GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
46+
47+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
48+
# - name: Update dependency graph
49+
# uses: advanced-security/maven-dependency-submission-action@v5
50+
# if: github.ref == 'refs/heads/main'
51+
52+
check:
53+
name: check
54+
if: >
55+
always()
56+
needs: [build]
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Decide whether the needed jobs succeeded or failed
60+
uses: re-actors/alls-green@release/v1
61+
with:
62+
jobs: ${{ toJSON(needs) }}

core/pom.xml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,32 @@
55

66
<parent>
77
<groupId>io.github.opentelekomcloud-community</groupId>
8-
<artifactId>otc-sdk-v1</artifactId>
8+
<artifactId>otc-sdk-v1-pom</artifactId>
99
<version>1.0.0</version>
1010
</parent>
1111

12+
<groupId>io.github.opentelekomcloud-community</groupId>
1213
<artifactId>otc-sdk-v1-core</artifactId>
14+
<packaging>jar</packaging>
1315

14-
<name>OTC SDK for Java Core</name>
16+
<name>${project.groupId}:${project.artifactId}</name>
1517
<description>Core library for OTC Java SDK</description>
18+
<url>https://github.com/opentelekomcloud-community/otc-java-sdk-v1</url>
1619

17-
<packaging>jar</packaging>
20+
<scm>
21+
<connection>scm:git:git://github.com/opentelekomcloud-community/otc-java-sdk-v1.git</connection>
22+
<developerConnection>scm:git:ssh://github.com:opentelekomcloud-community/otc-java-sdk-v1.git</developerConnection>
23+
<url>http://github.com/opentelekomcloud-community/otc-java-sdk-v1/tree/main</url>
24+
</scm>
1825

1926
<properties>
20-
21-
<!-- <bgmprovider.version>1.0.4</bgmprovider.version> -->
2227
<bgmprovider.version>2.0.0</bgmprovider.version>
23-
24-
<!-- <commons-codec.version>1.16.0</commons-codec.version> -->
2528
<commons-codec.version>1.18.0</commons-codec.version>
26-
27-
<!-- <commons-logging.version>1.2</commons-logging.version> -->
2829
<commons-logging.version>1.3.5</commons-logging.version>
29-
3030
<httpclient.version>4.5.14</httpclient.version>
31-
32-
<!-- <httpcore.version>4.4.13</httpcore.version> -->
3331
<httpcore.version>4.4.16</httpcore.version>
34-
3532
<okhttp.version>4.11.0</okhttp.version>
36-
37-
<!-- <okio.version>3.5.0</okio.version> -->
38-
<okio.version>3.15.0</okio.version>
39-
33+
<okio.version>3.15.0</okio.version>
4034
</properties>
4135

4236
<dependencies>
@@ -170,4 +164,4 @@
170164
</plugins>
171165
</reporting>
172166

173-
</project>
167+
</project>

0 commit comments

Comments
 (0)