Skip to content

Commit 7ced590

Browse files
run ci
1 parent 5ead796 commit 7ced590

File tree

3 files changed

+46
-41
lines changed

3 files changed

+46
-41
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish package to the Maven Central Repository
2+
on: [ push ] # Trigger the workflow when a push (commit) event occurs
3+
#on:
4+
# release:
5+
# types: [ created ]
6+
jobs:
7+
publish-maven:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Maven Central Repository
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '11'
18+
distribution: 'adopt'
19+
server-id: ossrh
20+
server-username: ${{ secrets.OSSRH_USERNAME }}
21+
server-password: ${{ secrets.OSSRH_TOKEN }}
22+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
23+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
24+
- name: Publish package
25+
run: mvn --batch-mode deploy

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,6 @@ on: [ push ] # Trigger the workflow when a push (commit) event occurs
44
# release:
55
# types: [ created ]
66
jobs:
7-
publish-maven:
8-
runs-on: ubuntu-latest
9-
permissions:
10-
contents: read
11-
packages: write
12-
steps:
13-
- uses: actions/checkout@v3
14-
# - name: Import private gpg key
15-
# run: |
16-
# gpg --batch --import <(echo "$GPG_PRIVATE_KEY")
17-
# env:
18-
# GPG_TTY: $(tty)
19-
- name: Set up Maven Central Repository
20-
uses: actions/setup-java@v3
21-
with:
22-
java-version: '11'
23-
distribution: 'adopt'
24-
server-id: ossrh
25-
server-username: ${{ secrets.OSSRH_USERNAME }}
26-
server-password: ${{ secrets.OSSRH_TOKEN }}
27-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
28-
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
29-
- name: Publish package
30-
run: mvn --batch-mode deploy
317
publish-github:
328
runs-on: ubuntu-latest
339
steps:

pom.xml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.contentstack.sdk</groupId>
77
<artifactId>java</artifactId>
8-
<version>1.12.2</version>
8+
<version>1.12.2-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010
<name>contentstack-java</name>
1111
<description>Java SDK for Contentstack Content Delivery API</description>
@@ -86,9 +86,13 @@
8686
</developers>
8787

8888
<distributionManagement>
89+
<!-- <snapshotRepository>-->
90+
<!-- <id>ossrh</id>-->
91+
<!-- <url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
92+
<!-- </snapshotRepository>-->
8993
<snapshotRepository>
90-
<id>ossrh</id>
91-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
94+
<id>github</id>
95+
<url>https://maven.pkg.github.com/contentstack/contentstack-java</url>
9296
</snapshotRepository>
9397
<repository>
9498
<id>ossrh</id>
@@ -267,20 +271,20 @@
267271
<artifactId>maven-enforcer-plugin</artifactId>
268272
<version>3.0.0-M2</version>
269273
</plugin>
270-
<!-- <plugin>-->
271-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
272-
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
273-
<!-- <version>1.6</version>-->
274-
<!-- <executions>-->
275-
<!-- <execution>-->
276-
<!-- <id>sign-artifacts</id>-->
277-
<!-- <phase>verify</phase>-->
278-
<!-- <goals>-->
279-
<!-- <goal>sign</goal>-->
280-
<!-- </goals>-->
281-
<!-- </execution>-->
282-
<!-- </executions>-->
283-
<!-- </plugin>-->
274+
<!-- <plugin>-->
275+
<!-- <groupId>org.apache.maven.plugins</groupId>-->
276+
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
277+
<!-- <version>1.6</version>-->
278+
<!-- <executions>-->
279+
<!-- <execution>-->
280+
<!-- <id>sign-artifacts</id>-->
281+
<!-- <phase>verify</phase>-->
282+
<!-- <goals>-->
283+
<!-- <goal>sign</goal>-->
284+
<!-- </goals>-->
285+
<!-- </execution>-->
286+
<!-- </executions>-->
287+
<!-- </plugin>-->
284288
<plugin>
285289
<groupId>org.apache.maven.plugins</groupId>
286290
<artifactId>maven-compiler-plugin</artifactId>

0 commit comments

Comments
 (0)