Skip to content
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
423d72f
Update to maven central publishing
dubdabasoduba Oct 15, 2025
c251668
git tag v1.0.4-SNAPSHOT
dubdabasoduba Oct 15, 2025
b3e3cc5
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 15, 2025
34a0b21
Update to add maven central publishing
dubdabasoduba Oct 29, 2025
7277cd3
Adding the jar file so it's now missing during publishing
dubdabasoduba Oct 29, 2025
ff7cc4a
Remove settings from tracking
dubdabasoduba Oct 29, 2025
a7b272e
Cleaning up to make sure the javadoc JAR is built and ready for use
dubdabasoduba Oct 29, 2025
9918df4
💚 Fix the release build to avoid duplicate artifacts
dubdabasoduba Oct 29, 2025
97f45ac
🐛 Updating the workflow to add gpg signing
dubdabasoduba Oct 29, 2025
30e2a57
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
3ad2abb
🐛 Update the ci workflow to make sure it fetch credentials from the c…
dubdabasoduba Oct 29, 2025
1e673d8
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
9f87bb7
🐛 Fix bugs on decoding the keys
dubdabasoduba Oct 29, 2025
8ee7b80
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
e529277
🐛 Updating to make sure gpg is found
dubdabasoduba Oct 29, 2025
8040a84
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
1b96f4c
🐛 Update the permissions on the gpg files
dubdabasoduba Oct 29, 2025
9d4b836
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
0bee7f6
🐛 Passphase missing fixes
dubdabasoduba Oct 29, 2025
b90e579
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
4c62d93
🐛 Refactor workflow to reduce verbose
dubdabasoduba Oct 29, 2025
5597eaa
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
7d13829
🐛 Mapp the passphrase to the correct key
dubdabasoduba Oct 29, 2025
93e4a39
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
475c328
🔥 Remove broken file
dubdabasoduba Oct 29, 2025
5997897
🐛 Add file
dubdabasoduba Oct 29, 2025
ff116a4
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
7ebbe75
🐛 Makes sure we do not use the setting.xml from the org
dubdabasoduba Oct 29, 2025
845c532
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Oct 29, 2025
ed317e0
🐛 Add debug on logs
dubdabasoduba Nov 4, 2025
41d9ad5
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
1f90da9
🐛 Fix signing and still have debug logs for publishing
dubdabasoduba Nov 4, 2025
695f515
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
d77ab59
🐛 Update the `envs`
dubdabasoduba Nov 4, 2025
6d3d494
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
895f244
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
7e0f19b
🐛 Update with more logs to see what maven uses for publishing
dubdabasoduba Nov 4, 2025
b4ac682
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
e3bf489
🐛 Add variable-based credentials
dubdabasoduba Nov 4, 2025
b34bc70
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
c76139f
💚 Pick the correct credentials from secrets
dubdabasoduba Nov 4, 2025
bef3a45
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
1cf2c9b
💚 Debug on the settings.xml to see what we have
dubdabasoduba Nov 4, 2025
11443c8
Merge branch 'main' of github.com:opensrp/fhir-common-utils into feat…
dubdabasoduba Nov 4, 2025
fa66d8e
💚 FOrce literal settings.xml
dubdabasoduba Nov 4, 2025
9415598
💚 Update the release workflow to remove all the debug pieces
dubdabasoduba Nov 4, 2025
5e6fd31
Remove all the debug pieces
dubdabasoduba Nov 4, 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
78 changes: 5 additions & 73 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ jobs:
fetch-depth: 0
submodules: recursive

# Ensure we do NOT inherit an org-level ~/.m2/settings.xml
- name: Remove any pre-existing Maven settings.xml
run: |
if [ -f "$HOME/.m2/settings.xml" ]; then
echo "Found existing ~/.m2/settings.xml — removing."
rm -f "$HOME/.m2/settings.xml"
else
echo "No pre-existing ~/.m2/settings.xml found."
fi
run: rm -f "$HOME/.m2/settings.xml" || true

- name: Set up Temurin JDK 11 (Maven, Central auth, and GPG)
uses: actions/setup-java@v4
Expand All @@ -39,12 +32,10 @@ jobs:
java-version: "11"
cache: maven
overwrite-settings: true
# we still let setup-java do its thing for GPG; we'll override settings.xml next
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}

# 🔒 Force a literal ~/.m2/settings.xml with Sonatype token NAME/VALUE (no ${env.*})
- name: Force literal settings.xml (no ${env.*})
- name: Configure Maven settings for Sonatype Central
run: |
mkdir -p "$HOME/.m2"
cat > "$HOME/.m2/settings.xml" <<'XML'
Expand All @@ -66,36 +57,10 @@ jobs:
</servers>
</settings>
XML
# Inject secrets as literals (GitHub masks values in logs automatically)
sed -i "s#__CENTRAL_USERNAME__#${{ secrets.CENTRAL_USERNAME }}#g" "$HOME/.m2/settings.xml"
sed -i "s#__CENTRAL_PASSWORD__#${{ secrets.CENTRAL_PASSWORD }}#g" "$HOME/.m2/settings.xml"
sed -i "s#__GPG_PASSPHRASE__#${{ secrets.GPG_PASSPHRASE }}#g" "$HOME/.m2/settings.xml"

# ✅ Guard: fail if any ${env.*} placeholders remain
- name: Sanity-check raw settings.xml (should NOT contain ${env.)
run: |
echo "----- RAW ~/.m2/settings.xml (first 80 lines) -----"
sed -n '1,80p' "$HOME/.m2/settings.xml"
echo "----------------------------------------------------"
if grep -q '\${env\.' "$HOME/.m2/settings.xml"; then
echo "❌ Detected \${env.*} placeholders in settings.xml. A variable-based config overwrote literal creds."
exit 1
else
echo "✅ settings.xml contains literal (masked) credentials for server id 'central'."
fi

- name: Show effective settings (sanitized)
run: |
echo "Java version:" && java -version
echo
echo "Maven version:" && mvn -v
echo
echo "Effective Maven settings (first 300 lines, passwords hidden):"
mvn -B -ntp help:effective-settings -DshowPasswords=false | sed -n '1,300p'
echo
echo "Servers found in effective settings:"
mvn -B -ntp help:effective-settings -DshowPasswords=false | awk '/<servers>/{flag=1} flag; /<\/servers>/{flag=0}'

- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
Expand All @@ -114,49 +79,16 @@ jobs:
mvn -B -ntp versions:set -DnewVersion="${{ steps.version.outputs.VERSION }}"
mvn -B -ntp versions:commit

- name: Show effective settings before build (sanitized)
run: mvn -B -ntp help:effective-settings -DshowPasswords=false | sed -n '1,300p'

- name: Build & test (signs at verify)
run: mvn -X -B -ntp clean verify
- name: Build & Test (signs at verify)
run: mvn -B -ntp clean verify
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Show effective settings before deploy (sanitized)
run: mvn -B -ntp help:effective-settings -DshowPasswords=false | sed -n '1,300p'

- name: Deploy to Sonatype Central
run: mvn -X -B -ntp deploy -DskipTests
run: mvn -B -ntp deploy -DskipTests
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Verify artifacts & signatures
if: always()
run: |
echo "Artifacts in target/:"
ls -l target || true
echo
echo "Signature files in target/:"
find target -maxdepth 1 -type f -name "*.asc" -print || true
echo
echo "Local repo contents for this version:"
ART="$HOME/.m2/repository/org/smartregister/fhir-common-utils/${{ steps.version.outputs.VERSION }}"
if [ -d "$ART" ]; then ls -la "$ART"; else echo "Not found: $ART"; fi

- name: Upload build outputs (for debugging)
if: always()
uses: actions/upload-artifact@v4
with:
name: target-${{ steps.version.outputs.VERSION }}
path: |
target/*.jar
target/*.pom
target/*.asc
target/*-sources.jar
target/*-javadoc.jar
if-no-files-found: ignore
retention-days: 7

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
Expand Down