Skip to content

Commit f6be52b

Browse files
Merge pull request #128 from skyflowapi/SK-1753-internal-release-workflow
SK-1752 workflow for internal release
2 parents d1c8d5e + 8b7a0e8 commit f6be52b

3 files changed

Lines changed: 84 additions & 24 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish package to the JFROG Artifactory
2+
on:
3+
push:
4+
tags: '*.*.*'
5+
paths-ignore:
6+
- "pom.xml"
7+
- "*.md"
8+
branches:
9+
- release/*
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Jfrog artifactory
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: '1.8'
20+
distribution: 'adopt'
21+
server-id: central
22+
server-username: JFROG_USERNAME
23+
server-password: JFROG_PASSWORD
24+
gpg-private-key: ${{ secrets.JFROG_GPG_KEY }} # Value of the GPG private key to import
25+
gpg-passphrase: JFROG_GPG_PASSPHRASE # env variable for GPG private key passphrase
26+
27+
- name: create-json
28+
id: create-json
29+
uses: jsdaniell/create-json@1.1.2
30+
with:
31+
name: "credentials.json"
32+
json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}
33+
34+
- name: Publish package to Jfrog Artifactory
35+
run: mvn clean deploy -P jfrog
36+
env:
37+
JFROG_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
38+
JFROG_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
39+
JFROG_GPG_PASSPHRASE: ${{ secrets.JFROG_GPG_PASSPHRASE }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}
2727

2828
- name: Publish package to Maven Central
29-
run: mvn --batch-mode deploy
29+
run: mvn --batch-mode deploy -P maven-central
3030
env:
3131
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3232
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

pom.xml

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.skyflow</groupId>
88
<artifactId>skyflow-java</artifactId>
9-
<version>1.15.0</version>
9+
<version>1.15.0-v2dev2.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>
@@ -44,17 +44,6 @@
4444
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
4545
</properties>
4646

47-
<distributionManagement>
48-
<snapshotRepository>
49-
<id>ossrh</id>
50-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
51-
</snapshotRepository>
52-
<repository>
53-
<id>ossrh</id>
54-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
55-
</repository>
56-
</distributionManagement>
57-
5847
<dependencies>
5948
<!-- newly added v2 dependencies -->
6049
<dependency>
@@ -132,17 +121,17 @@
132121

133122
<build>
134123
<plugins>
135-
<plugin>
136-
<groupId>org.sonatype.plugins</groupId>
137-
<artifactId>nexus-staging-maven-plugin</artifactId>
138-
<version>1.6.7</version>
139-
<extensions>true</extensions>
140-
<configuration>
141-
<serverId>ossrh</serverId>
142-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
143-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
144-
</configuration>
145-
</plugin>
124+
<!-- <plugin>-->
125+
<!-- <groupId>org.sonatype.plugins</groupId>-->
126+
<!-- <artifactId>nexus-staging-maven-plugin</artifactId>-->
127+
<!-- <version>1.6.7</version>-->
128+
<!-- <extensions>true</extensions>-->
129+
<!-- <configuration>-->
130+
<!-- <serverId>ossrh</serverId>-->
131+
<!-- <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
132+
<!-- <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
133+
<!-- </configuration>-->
134+
<!-- </plugin>-->
146135
<plugin>
147136
<groupId>org.apache.maven.plugins</groupId>
148137
<artifactId>maven-source-plugin</artifactId>
@@ -189,6 +178,7 @@
189178
<configuration>
190179
<excludes>
191180
<exclude>**/example/*</exclude>
181+
<exclude>**/generated/rest/**</exclude>
192182
</excludes>
193183
</configuration>
194184
<executions>
@@ -252,4 +242,35 @@
252242
</repository>
253243
</repositories>
254244

245+
<profiles>
246+
<profile>
247+
<id>maven-central</id>
248+
<distributionManagement>
249+
<repository>
250+
<id>ossrh</id>
251+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
252+
</repository>
253+
<snapshotRepository>
254+
<id>ossrh</id>
255+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
256+
</snapshotRepository>
257+
</distributionManagement>
258+
</profile>
259+
<profile>
260+
<id>jfrog</id>
261+
<distributionManagement>
262+
<repository>
263+
<id>central</id>
264+
<name>prekarilabs.jfrog.io-releases</name>
265+
<url>https://prekarilabs.jfrog.io/artifactory/skyflow-java</url>
266+
</repository>
267+
<snapshotRepository>
268+
<id>snapshots</id>
269+
<name>prekarilabs.jfrog.io-snapshots</name>
270+
<url>https://prekarilabs.jfrog.io/artifactory/skyflow-java</url>
271+
</snapshotRepository>
272+
</distributionManagement>
273+
</profile>
274+
</profiles>
275+
255276
</project>

0 commit comments

Comments
 (0)