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" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd318afce8..7bde8f6a2d 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 @@ -66,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)"