Compare commits

..

58 Commits

Author SHA1 Message Date
amithkoujalgi
1c687831d1 [maven-release-plugin] prepare release v1.0.18 2023-12-19 19:02:02 +00:00
Amith Koujalgi
2c2750b3e1 Merge remote-tracking branch 'origin/main' 2023-12-20 00:31:05 +05:30
Amith Koujalgi
809efa9053 clean up 2023-12-20 00:30:46 +05:30
amithkoujalgi
4a7e9ac7f0 [maven-release-plugin] prepare for next development iteration 2023-12-19 18:50:10 +00:00
amithkoujalgi
04f9e77149 [maven-release-plugin] prepare release v1.0.17 2023-12-19 18:50:08 +00:00
Amith Koujalgi
553e7dab41 clean up 2023-12-20 00:19:13 +05:30
Amith Koujalgi
3a75cd7e92 clean up 2023-12-20 00:16:25 +05:30
amithkoujalgi
c45b5de3ea [maven-release-plugin] prepare release v1.0.16 2023-12-19 18:45:42 +00:00
Amith Koujalgi
6c2b3ca206 clean up 2023-12-20 00:14:45 +05:30
Amith Koujalgi
1ff5fbfc9f clean up 2023-12-20 00:10:55 +05:30
Amith Koujalgi
929242cc26 clean up 2023-12-20 00:02:09 +05:30
amithkoujalgi
d854f82966 [maven-release-plugin] prepare for next development iteration 2023-12-19 18:29:03 +00:00
amithkoujalgi
585858a99a [maven-release-plugin] prepare release v1.0.15 2023-12-19 18:29:02 +00:00
Amith Koujalgi
95fa72c1ec [maven-release-plugin] prepare for next development iteration 2023-12-19 23:58:06 +05:30
Amith Koujalgi
59015dff8f [maven-release-plugin] prepare release v1.0.14 2023-12-19 23:58:03 +05:30
amithkoujalgi
d601ce0e1e [maven-release-plugin] prepare for next development iteration 2023-12-19 18:11:27 +00:00
amithkoujalgi
9820248115 [maven-release-plugin] prepare release v1.0.13 2023-12-19 18:11:26 +00:00
Amith Koujalgi
7ff040f706 clean up 2023-12-19 23:40:23 +05:30
Amith Koujalgi
f4b83c2860 clean up 2023-12-19 23:39:07 +05:30
Amith Koujalgi
082b708927 clean up 2023-12-19 23:35:16 +05:30
Amith Koujalgi
8a895e02fb clean up 2023-12-19 23:33:34 +05:30
Amith Koujalgi
b878fb7b3f clean up 2023-12-19 23:33:08 +05:30
Amith Koujalgi
5c66d8df5f [maven-release-plugin] prepare for next development iteration 2023-12-19 23:26:23 +05:30
Amith Koujalgi
ebd34a536d [maven-release-plugin] prepare release v1.0.12 2023-12-19 23:26:20 +05:30
Amith Koujalgi
f2c7169aca clean up 2023-12-19 23:25:53 +05:30
Amith Koujalgi
875d1c50b0 [maven-release-plugin] prepare for next development iteration 2023-12-19 22:50:36 +05:30
Amith Koujalgi
8c4533b704 [maven-release-plugin] prepare release v1.0.11 2023-12-19 22:50:33 +05:30
Amith Koujalgi
bb50a66d80 clean up 2023-12-19 22:48:01 +05:30
Amith Koujalgi
e8dccd9b6a [maven-release-plugin] prepare for next development iteration 2023-12-19 22:45:05 +05:30
Amith Koujalgi
cc1d2c4dc1 [maven-release-plugin] prepare release v1.0.10 2023-12-19 22:45:02 +05:30
Amith Koujalgi
8e93e580cd [maven-release-plugin] prepare for next development iteration 2023-12-19 22:41:50 +05:30
Amith Koujalgi
97e3df4f44 [maven-release-plugin] prepare release v1.0.9 2023-12-19 22:41:47 +05:30
Amith Koujalgi
8b2dccdae1 clean up 2023-12-19 22:40:32 +05:30
Amith Koujalgi
7486016e85 [maven-release-plugin] prepare for next development iteration 2023-12-19 21:27:34 +05:30
Amith Koujalgi
1b4ad78acf [maven-release-plugin] prepare release v1.0.8 2023-12-19 21:27:31 +05:30
Amith Koujalgi
9936200dcc Merge remote-tracking branch 'origin/main' 2023-12-19 21:27:05 +05:30
Amith Koujalgi
5bd3573123 clean up 2023-12-19 21:26:40 +05:30
amithkoujalgi
761f82f321 [maven-release-plugin] prepare for next development iteration 2023-12-19 15:36:15 +00:00
amithkoujalgi
9ec8e5155b [maven-release-plugin] prepare release v1.0.7 2023-12-19 15:36:14 +00:00
amithkoujalgi
47c014968d [maven-release-plugin] prepare for next development iteration 2023-12-19 15:13:00 +00:00
amithkoujalgi
e50b978aa0 [maven-release-plugin] prepare release v1.0.6 2023-12-19 15:12:58 +00:00
Amith Koujalgi
51a57384e1 [maven-release-plugin] prepare for next development iteration 2023-12-19 20:41:59 +05:30
Amith Koujalgi
4425226439 [maven-release-plugin] prepare release v1.0.5 2023-12-19 20:41:56 +05:30
Amith Koujalgi
80f9f6c370 clean up 2023-12-19 20:41:22 +05:30
Amith Koujalgi
28b8877477 Merge remote-tracking branch 'origin/main' 2023-12-19 20:39:33 +05:30
Amith Koujalgi
c40e9999ab clean up 2023-12-19 20:39:26 +05:30
amithkoujalgi
d21c331b6e [maven-release-plugin] prepare for next development iteration 2023-12-19 15:03:17 +00:00
amithkoujalgi
6ac6c09693 [maven-release-plugin] prepare release v1.0.4 2023-12-19 15:03:16 +00:00
Amith Koujalgi
d18148241c clean up 2023-12-19 20:32:22 +05:30
amithkoujalgi
9e9b3bbb43 [maven-release-plugin] prepare for next development iteration 2023-12-19 14:57:56 +00:00
amithkoujalgi
ed124da25f [maven-release-plugin] prepare release v1.0.3 2023-12-19 14:57:55 +00:00
Amith Koujalgi
c33f6ec164 clean up 2023-12-19 20:27:05 +05:30
Amith Koujalgi
126d0c8986 clean up 2023-12-19 20:22:23 +05:30
Amith Koujalgi
8a59626f0c clean up 2023-12-19 20:21:00 +05:30
Amith Koujalgi
9e3d48b24d clean up 2023-12-19 20:20:39 +05:30
Amith Koujalgi
ad4a5e36aa clean up 2023-12-19 20:20:29 +05:30
Amith Koujalgi
90d1757b3f clean up 2023-12-19 20:17:54 +05:30
Amith Koujalgi
f2b4bf9ae5 [maven-release-plugin] prepare for next development iteration 2023-12-19 20:16:50 +05:30
3 changed files with 94 additions and 48 deletions

View File

@@ -5,7 +5,7 @@ name: Test and Publish Package
#on:
# release:
# types: [created]
# types: [ "created" ]
on:
push:
@@ -14,12 +14,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
@@ -29,13 +27,8 @@ jobs:
distribution: 'adopt-hotspot'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
# - name: Run Tests
# run: mvn -U clean verify --file pom.xml
- name: Build with Maven
run: mvn --file pom.xml -U clean package -Punit-tests
- name: Set up Apache Maven Central (Overwrite settings.xml)
uses: actions/setup-java@v3
with: # running setup-java again overwrites the settings.xml
@@ -47,9 +40,25 @@ jobs:
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Set up Maven cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn -B -ntp clean install
- name: Publish to GitHub Packages Apache Maven
run: mvn clean deploy -Punit-tests -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
# if: >
# github.event_name != 'pull_request' &&
# github.ref_name == 'main' &&
# contains(github.event.head_commit.message, 'release')
run: |
git config --global user.email "koujalgi.amith@gmail.com"
git config --global user.name "amithkoujalgi"
mvn -B -ntp -DskipTests -Pci-cd -Darguments="-DskipTests -Pci-cd" release:clean release:prepare release:perform
# mvn clean -Punit-tests release:clean release:prepare release:perform -B -Darguments="-DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}"
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

View File

@@ -5,10 +5,10 @@ it:
mvn clean verify -Pintegration-tests
build:
mvn clean test install -Punit-tests
mvn -B clean test install -Punit-tests -Dgpg.passphrase="${GPG_PASSPHRASE}" -e
release:
mvn clean -Punit-tests release:clean release:prepare release:perform -B
mvn -B clean install -Punit-tests release:clean release:prepare release:perform -Dgpg.passphrase="${GPG_PASSPHRASE}" -e
update-version:
mvn versions:set -DnewVersion=1.0.1

107
pom.xml
View File

@@ -4,7 +4,7 @@
<groupId>io.github.amithkoujalgi</groupId>
<artifactId>ollama4j</artifactId>
<version>1.0.2</version>
<version>1.0.18</version>
<name>Ollama4j</name>
<description>Java library for interacting with Ollama API.</description>
@@ -39,22 +39,11 @@
<connection>scm:git:git@github.com:amithkoujalgi/ollama4j.git</connection>
<developerConnection>scm:git:https://github.com/amithkoujalgi/ollama4j.git</developerConnection>
<url>https://github.com/amithkoujalgi/ollama4j</url>
<tag>v1.0.2</tag>
<tag>v1.0.18</tag>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -81,27 +70,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- This is necessary for gpg to not try to use the pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
<!-- <version>1.5</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>sign-artifacts</id>-->
<!-- <phase>verify</phase>-->
<!-- <goals>-->
<!-- <goal>sign</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- &lt;!&ndash; This is necessary for gpg to not try to use the pinentry programs &ndash;&gt;-->
<!-- <gpgArguments>-->
<!-- <arg>&#45;&#45;pinentry-mode</arg>-->
<!-- <arg>loopback</arg>-->
<!-- </gpgArguments>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- Surefire Plugin for Unit Tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -143,7 +132,7 @@
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<goals>install</goals>
<!-- <goals>install</goals>-->
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
@@ -206,6 +195,9 @@
<skipUnitTests>false</skipUnitTests>
<skipIntegrationTests>true</skipIntegrationTests>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>integration-tests</id>
@@ -215,6 +207,51 @@
<skipIntegrationTests>false</skipIntegrationTests>
</properties>
</profile>
<profile>
<id>ci-cd</id>
<properties>
<test.env>unit</test.env>
<skipUnitTests>true</skipUnitTests>
<skipIntegrationTests>true</skipIntegrationTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<!-- Prevent gpg from using pinentry programs. Fixes:
gpg: signing failed: Inappropriate ioctl for device -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>