Skip to content

Commit

Permalink
Fixed maven release
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed Aug 21, 2024
1 parent 75f1efd commit 1994fec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ jobs:
with: # The environment variables are defined when needed (here, when the package is being published)
distribution: 'temurin'
java-version: '17'
server-id: 'ossrh'
server-id: 'ossrh'
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Install xmllint
run: sudo apt-get update && sudo apt-get install -y libxml2-utils

- name: Determine release list
run:
chmod +x ./service_config/version_check.sh
./service_config/version_check.sh
run: bash -c ./service_config/version_check.sh

- name: Install dependencies
run: mvn clean install -Dgpg.skip

- name: Deploy and Release artifact
run: |
if [ -z ${{ env.ARTIFACTS_TO_BE_RELEASED}} ]; then
Expand Down
9 changes: 5 additions & 4 deletions service_config/version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ for artifact in "${artifacts[@]}"; do
done < <(find "$artifact" -name "pom.xml")
done

# Join the array elements into a string with a comma as delimiter
ARTIFACTS_TO_BE_RELEASED_STR=$(IFS=","; echo "${artifacts_to_be_released[*]}")
# Use GitHub Actions command to set an environment variable
echo "ARTIFACTS_TO_BE_RELEASED=$ARTIFACTS_TO_BE_RELEASED_STR" >> "$GITHUB_ENV"
# Join the array elements into a string with a comma as delimiter
ARTIFACTS_TO_BE_RELEASED_STR=$(IFS=","; echo "${artifacts_to_be_released[*]}")
echo "Releasable artifacts: $ARTIFACTS_TO_BE_RELEASED_STR"
# Use GitHub Actions command to set an environment variable
echo "ARTIFACTS_TO_BE_RELEASED=$ARTIFACTS_TO_BE_RELEASED_STR" >> "$GITHUB_ENV"

0 comments on commit 1994fec

Please sign in to comment.