Skip to content
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
16 changes: 1 addition & 15 deletions .github/publish-maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF >"$MVN_SETTINGS_FILE"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
Loading