From dc08d23b4c0c35364c6eccd3ef33024987142774 Mon Sep 17 00:00:00 2001 From: Justin Pihony Date: Wed, 15 Oct 2025 14:24:52 -0400 Subject: [PATCH 1/3] Add environment variables for global resolver setup --- .github/workflows/publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd318afce8..4515fc2673 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,6 +44,10 @@ jobs: path: scripts - name: Setup global resolver + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PUBLISH_USER: ${{ secrets.PUBLISH_USER }} + PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }} run: | chmod +x ./scripts/setup_global_resolver.sh ./scripts/setup_global_resolver.sh From 0f88f82928426e711ffec55e95b72fd0b811265a Mon Sep 17 00:00:00 2001 From: Justin Pihony Date: Wed, 15 Oct 2025 14:27:09 -0400 Subject: [PATCH 2/3] Modify publish-maven.sh to skip merging if settings exist Updated the publish-maven.sh script to skip merging if the settings file already exists, indicating that it should be preconfigured for Sonatype publishing. --- .github/publish-maven.sh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/publish-maven.sh b/.github/publish-maven.sh index c18f760cff..06a2a16544 100755 --- a/.github/publish-maven.sh +++ b/.github/publish-maven.sh @@ -35,21 +35,7 @@ MVN_SETTINGS_FILE="$HOME/.m2/settings.xml" mkdir -p "$(dirname "$MVN_SETTINGS_FILE")" if [ -f "$MVN_SETTINGS_FILE" ]; then - echo "⚙️ Settings file found. Merging publishing configuration..." - xmlstarlet ed -L \ - -s /settings -t elem -n servers -v "" \ - -s /settings/servers[1] -t elem -n server \ - -i /settings/servers[1]/server[1] -t attr -n id -v central \ - -s /settings/servers[1]/server[1] -t elem -n username -v '${SONATYPE_USERNAME}' \ - -s /settings/servers[1]/server[1] -t elem -n password -v '${SONATYPE_PASSWORD}' \ - "$MVN_SETTINGS_FILE" - xmlstarlet ed -L \ - -s '/settings/profiles/profile[id="akka-repo"]' -t elem -n activation -v "" \ - -s '/settings/profiles/profile[id="akka-repo"]/activation' -t elem -n activeByDefault -v "true" \ - -s '/settings/profiles/profile[id="akka-repo"]' -t elem -n properties -v "" \ - -s '/settings/profiles/profile[id="akka-repo"]/properties' -t elem -n gpg.passphrase -v '${PGP_PASSPHRASE}' \ - "$MVN_SETTINGS_FILE" - echo "✅ Merge complete." + echo "✅ Settings file already exists. It is expected to be set up with Sonatype publishing details already, so doing nothing to the file." else echo "✨ Settings file not found. Creating a new one with publishing configuration." cat <"$MVN_SETTINGS_FILE" From aaf5c19c0c99461e5158c14d675f4d92656c9b80 Mon Sep 17 00:00:00 2001 From: Justin Pihony Date: Thu, 16 Oct 2025 16:41:19 -0400 Subject: [PATCH 3/3] Remove xmlstarlet installation from publish workflow Removed installation step for xmlstarlet from the workflow. --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4515fc2673..7bde8f6a2d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,11 +70,6 @@ jobs: - name: sbt publishM2 run: sbt +publishM2 - - name: Install xmlstarlet - run: | - sudo apt-get update - sudo apt-get install -y xmlstarlet - - name: mvn deploy run: |- export SDK_VERSION="$(cat ~/kalix-sdk-version.txt)"