Skip to content

Commit 57b51cd

Browse files
authored
Merge pull request #1 from wtx-labs/feature/release-012
Feature/release 012
2 parents b9fd6b1 + 7136aa7 commit 57b51cd

File tree

5 files changed

+69
-49
lines changed

5 files changed

+69
-49
lines changed

.github/settings.xml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
55
https://maven.apache.org/xsd/settings-1.0.0.xsd">
6-
<servers>
7-
<server>
8-
<id>github</id>
9-
<username>${env.MAVEN_USERNAME}</username>
10-
<password>${env.MAVEN_PASSWORD}</password>
11-
</server>
12-
</servers>
6+
<servers>
7+
<server>
8+
<id>github</id>
9+
<username>${env.MAVEN_USERNAME}</username>
10+
<password>${env.MAVEN_PASSWORD}</password>
11+
</server>
12+
<server>
13+
<id>central</id>
14+
<username>${{env.OSSRH_USERNAME_TOKEN }}</username>
15+
<password>${{env.OSSRH_PASSWORD_TOKEN }}</password>
16+
</server>
17+
</servers>
18+
1319
</settings>

.github/workflows/maven-central.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,40 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Set up JDK 8
19+
- name: Set up JDK 17
2020
uses: actions/setup-java@v4
2121
with:
22-
java-version: '8'
22+
java-version: '17'
2323
distribution: 'temurin'
2424
cache: maven
2525

2626
- name: Setup GPG
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
29+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
30+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2731
run: |
2832
echo "Setting up GPG..."
2933
mkdir -p ~/.gnupg
3034
chmod 700 ~/.gnupg
3135
32-
# Import private key
33-
echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key
34-
echo "Importing GPG key..."
35-
gpg --batch --import private.key
36-
rm private.key
37-
38-
# Configure GPG
39-
echo "Configuring GPG..."
40-
cat > ~/.gnupg/gpg.conf << EOF
41-
default-key ${{ secrets.GPG_KEYNAME }}
42-
use-agent
43-
pinentry-mode loopback
44-
EOF
36+
# Debug: Sprawdź długość klucza
37+
echo "GPG_PRIVATE_KEY length: ${#GPG_PRIVATE_KEY}"
4538
46-
# Debug information
47-
echo "=== GPG Keys ==="
48-
gpg --list-secret-keys --keyid-format LONG
49-
gpg --list-keys --keyid-format LONG
50-
39+
# Debug: Sprawdź początek klucza (bez ujawniania tajemnicy)
40+
echo "GPG_KEYNAME: $GPG_KEYNAME"
41+
echo "GPG_PASSPHRASE length: ${#GPG_PASSPHRASE}"
42+
echo "First 10 chars of GPG_PRIVATE_KEY: ${GPG_PRIVATE_KEY:0:10}"
43+
44+
# Tepporary write key for debug
45+
echo "$GPG_PRIVATE_KEY" > private.tmp
46+
echo "File content (first line): $(head -1 private.tmp)"
47+
48+
# Import key
49+
echo "Importing GPG key..."
50+
gpg --batch --import private.tmp || echo "Import failed!"
51+
rm private.tmp
52+
5153
- name: Configure Maven
5254
run: |
5355
mkdir -p ~/.m2
@@ -74,21 +76,23 @@ jobs:
7476
</profiles>
7577
</settings>
7678
EOF
77-
79+
7880
- name: Build and Publish
7981
env:
8082
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
8183
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
8284
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
85+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
8386
run: |
8487
echo "Starting Maven build and deploy..."
8588
mvn clean deploy -P release \
8689
-Dmaven.javadoc.skip=false \
8790
-Dmaven.deploy.skip=false \
88-
-Dgpg.keyname=${{ secrets.GPG_KEYNAME }} \
89-
-Dgpg.useagent=true \
91+
-Dgpg.keyname=$GPG_KEYNAME \
92+
-Dgpg.useagent=false \
93+
-Dgpg.passphrase=$GPG_PASSPHRASE \
9094
-Dmaven.test.failure.ignore=false \
91-
-DaltDeploymentRepository=ossrh::default::https://central.sonatype.com/api/v1/publisher/upload \
95+
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
9296
-DrepositoryId=ossrh \
93-
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \
94-
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }}
97+
-Dusername=$OSSRH_USERNAME \
98+
-Dpassword=$OSSRH_PASSWORD

.github/workflows/release.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717

18-
- name: Set up JDK 8
18+
- name: Set up JDK 17
1919
uses: actions/setup-java@v4
2020
with:
21-
java-version: '8'
21+
java-version: '17'
2222
distribution: 'temurin'
2323
cache: 'maven'
2424

@@ -31,14 +31,4 @@ jobs:
3131
- name: Create Release
3232
uses: softprops/action-gh-release@v1
3333
with:
34-
name: Release ${{ github.ref_name }}
35-
draft: false
36-
prerelease: false
37-
generate_release_notes: true
38-
files: |
39-
target/qualtrics-api-client-0.1.2.jar
40-
target/qualtrics-api-client-0.1.2-sources.jar
41-
target/qualtrics-api-client-0.1.2-javadoc.jar
42-
target/site/apidocs/**
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
name:

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
[![Java Version](https://img.shields.io/badge/Java-17%2B-blue)](https://www.java.com)
5+
[![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)
56

67
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. 🚀
78

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

9091
### 1️⃣ Installation
9192

92-
Clone and build the library from source:
93+
You can add the library to your project by including the dependency from Maven Central:
94+
```xml
95+
<!-- https://mvnrepository.com/artifact/pl.wtx.qualtrics/qualtrics-api-client -->
96+
<dependency>
97+
<groupId>pl.wtx.qualtrics</groupId>
98+
<artifactId>qualtrics-api-client</artifactId>
99+
<version>0.1.2</version>
100+
</dependency>
101+
```
102+
103+
Alternatively, clone and build the library from source:
104+
105+
```sh
106+
git clone https://github.com/wtx-labs/qualtrics-api-client-java.git
107+
cd qualtrics-api-client-java
108+
mvn clean install
109+
```
110+
111+
Then add the locally built artifact to your project:
93112

94113
```sh
95114
git clone https://github.com/wtx-labs/qualtrics-api-client-java.git

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
<executions>
134134
<execution>
135135
<id>attach-javadocs</id>
136+
<phase>package</phase>
136137
<goals>
137138
<goal>jar</goal>
138139
</goals>

0 commit comments

Comments
 (0)