Skip to content

Feature/release 1 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8097bdd
Bump version to 0.9.5
bartsli Jun 13, 2025
60482c9
Add GitHub Actions workflow for Maven Central publishing
bartsli Jun 13, 2025
3a2d7e9
Update GitHub Actions workflow with improved GPG configuration
bartsli Jun 13, 2025
fd488c8
Add GPG key listing and disable GPG agent in Maven configuration
bartsli Jun 13, 2025
465195e
Simplify GPG key import process
bartsli Jun 13, 2025
d033637
Add debug mode to Maven Central workflow
bartsli Jun 13, 2025
7c7c8ee
Enhance GPG key setup and add more diagnostic information
bartsli Jun 13, 2025
26a2ee3
Enhance GPG configuration with explicit default key and agent settings
bartsli Jun 14, 2025
2937b68
Add feature/release-1 branch trigger to Maven Central workflow
bartsli Jun 14, 2025
f191a97
Add more debug flags to Maven command
bartsli Jun 14, 2025
dc498e2
Use non-interactive GPG trust mode
bartsli Jun 14, 2025
61dd7a8
Modify GPG trust configuration
bartsli Jun 14, 2025
ead5cdc
Enhance GPG configuration with more debugging and direct trust setting
bartsli Jun 14, 2025
a02c5e7
Simplify GPG configuration and downgrade maven-gpg-plugin
bartsli Jun 14, 2025
85fabd7
Add Maven settings.xml configuration
bartsli Jun 14, 2025
9b83619
Fix Sonatype OSSRH authentication configuration
bartsli Jun 14, 2025
982e8cf
Pass Sonatype OSSRH credentials directly in Maven commands
bartsli Jun 14, 2025
36586e6
Add Sonatype credentials verification step
bartsli Jun 14, 2025
0b73028
Update URLs to Central Publishing Portal while keeping OSSRH secrets
bartsli Jun 14, 2025
b9a4b39
Update nexus-staging-maven-plugin URL to Central Publishing Portal
bartsli Jun 14, 2025
04ee3ed
Update deployment URLs to new Central Publishing Portal API endpoints
bartsli Jun 14, 2025
8ae3096
Replace nexus-staging-maven-plugin with central-publishing-maven-plugin
bartsli Jun 14, 2025
2383aa7
Update to new Central Publishing Portal API
bartsli Jun 14, 2025
034a31f
Update workflow to use new Central Publishing Portal API
bartsli Jun 14, 2025
0f24e09
Replace nexus-staging-maven-plugin with central-publishing-maven-plugin
bartsli Jun 14, 2025
678d4e8
Update server ID to central for Central Publishing Portal
bartsli Jun 14, 2025
9c75975
Remove debug flags from Maven build
bartsli Jun 14, 2025
716d5a1
Add MIT license information
bartsli Jun 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish to Maven Central

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Build and Publish
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
run: |
echo "Starting Maven build and deploy..."
mvn clean deploy -P release \
-Dmaven.javadoc.skip=false \
-Dmaven.deploy.skip=false \
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
-Dmaven.test.failure.ignore=false

echo "Checking deployment status..."
mvn nexus-staging:rc-list

echo "Closing staging repository..."
mvn nexus-staging:rc-close

echo "Releasing to Maven Central..."
mvn nexus-staging:rc-release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This API client provides a type-safe Java interface for WooCommerce REST API v3,

## 📦 Version information

- **Current version**: `0.9.4`
- **Current version**: `0.9.5`
- **Supported WooCommerce API version**: `v3`
- **Java compatibility**: Java 8+

Expand Down Expand Up @@ -93,7 +93,7 @@ Then add the locally built artifact to your project:
<dependency>
<groupId>pl.wtx.woocommerce</groupId>
<artifactId>woocommerce-api-client</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
</dependency>
```

Expand Down
88 changes: 87 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>pl.wtx.woocommerce</groupId>
<artifactId>woocommerce-api-client</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
<packaging>jar</packaging>

<name>WooCommerce REST API Client</name>
Expand All @@ -24,8 +24,20 @@
<gsonfire.version>1.9.0</gsonfire.version>
<jsr305.version>3.0.2</jsr305.version>
<javax.annotation.version>1.3.2</javax.annotation.version>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>

<dependency>
Expand Down Expand Up @@ -164,6 +176,33 @@
</executions>
</plugin>

<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>
</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>

Expand Down Expand Up @@ -201,4 +240,51 @@
</developer>
</developers>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading