Skip to content

Feature/release 012 #1

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 8 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 15 additions & 9 deletions .github/settings.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>github</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
<servers>
<server>
<id>github</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>central</id>
<username>${{env.OSSRH_USERNAME_TOKEN }}</username>
<password>${{env.OSSRH_PASSWORD_TOKEN }}</password>
</server>
</servers>

</settings>
56 changes: 30 additions & 26 deletions .github/workflows/maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,40 @@ jobs:
with:
fetch-depth: 0

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

- name: Setup GPG
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo "Setting up GPG..."
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg

# Import private key
echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key
echo "Importing GPG key..."
gpg --batch --import private.key
rm private.key

# Configure GPG
echo "Configuring GPG..."
cat > ~/.gnupg/gpg.conf << EOF
default-key ${{ secrets.GPG_KEYNAME }}
use-agent
pinentry-mode loopback
EOF
# Debug: Sprawdź długość klucza
echo "GPG_PRIVATE_KEY length: ${#GPG_PRIVATE_KEY}"

# Debug information
echo "=== GPG Keys ==="
gpg --list-secret-keys --keyid-format LONG
gpg --list-keys --keyid-format LONG

# Debug: Sprawdź początek klucza (bez ujawniania tajemnicy)
echo "GPG_KEYNAME: $GPG_KEYNAME"
echo "GPG_PASSPHRASE length: ${#GPG_PASSPHRASE}"
echo "First 10 chars of GPG_PRIVATE_KEY: ${GPG_PRIVATE_KEY:0:10}"

# Tepporary write key for debug
echo "$GPG_PRIVATE_KEY" > private.tmp
echo "File content (first line): $(head -1 private.tmp)"

# Import key
echo "Importing GPG key..."
gpg --batch --import private.tmp || echo "Import failed!"
rm private.tmp

- name: Configure Maven
run: |
mkdir -p ~/.m2
Expand All @@ -74,21 +76,23 @@ jobs:
</profiles>
</settings>
EOF

- name: Build and Publish
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
run: |
echo "Starting Maven build and deploy..."
mvn clean deploy -P release \
-Dmaven.javadoc.skip=false \
-Dmaven.deploy.skip=false \
-Dgpg.keyname=${{ secrets.GPG_KEYNAME }} \
-Dgpg.useagent=true \
-Dgpg.keyname=$GPG_KEYNAME \
-Dgpg.useagent=false \
-Dgpg.passphrase=$GPG_PASSPHRASE \
-Dmaven.test.failure.ignore=false \
-DaltDeploymentRepository=ossrh::default::https://central.sonatype.com/api/v1/publisher/upload \
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
-DrepositoryId=ossrh \
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }}
-Dusername=$OSSRH_USERNAME \
-Dpassword=$OSSRH_PASSWORD
16 changes: 3 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
with:
fetch-depth: 0

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

Expand All @@ -31,14 +31,4 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: |
target/qualtrics-api-client-0.1.2.jar
target/qualtrics-api-client-0.1.2-sources.jar
target/qualtrics-api-client-0.1.2-javadoc.jar
target/site/apidocs/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name:
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Java Version](https://img.shields.io/badge/Java-17%2B-blue)](https://www.java.com)
[![Maven Central](https://img.shields.io/maven-central/v/pl.wtx.qualtrics/qualtrics-api-client?label=Maven%20Central&logo=apache-maven&color=blue)](https://mvnrepository.com/artifact/pl.wtx.qualtrics/qualtrics-api-client)

A lightweight Java client library for Qualtrics API integration. Built for Java developers who need to integrate their applications with the Qualtrics Employee Experience platform. 🚀

Expand Down Expand Up @@ -89,7 +90,25 @@ The only requirement is to preserve the original author attribution in the sourc

### 1️⃣ Installation

Clone and build the library from source:
You can add the library to your project by including the dependency from Maven Central:
```xml
<!-- https://mvnrepository.com/artifact/pl.wtx.qualtrics/qualtrics-api-client -->
<dependency>
<groupId>pl.wtx.qualtrics</groupId>
<artifactId>qualtrics-api-client</artifactId>
<version>0.1.2</version>
</dependency>
```

Alternatively, clone and build the library from source:

```sh
git clone https://github.com/wtx-labs/qualtrics-api-client-java.git
cd qualtrics-api-client-java
mvn clean install
```

Then add the locally built artifact to your project:

```sh
git clone https://github.com/wtx-labs/qualtrics-api-client-java.git
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
Expand Down
Loading