fix: Trim whitespace from localVersion Gradle property #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Run build and tests | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
environment: CIRelease | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: temurin | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --all --tags | |
- name: Create .gradle dir | |
run: mkdir -p $HOME/.gradle | |
- name: Install gpg secret key | |
env: | |
SIGNINGFILE: ${{ secrets.SIGNINGFILE }} | |
run: | | |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
- name: Export gpg file | |
env: | |
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | |
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | |
run: | | |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg | |
- name: Create gradle sproperties | |
env: | |
APIKEY: ${{ secrets.APIKEY }} | |
APISECRET: ${{ secrets.APISECRET }} | |
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }} | |
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }} | |
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | |
SONATYPEUSER: ${{ secrets.SONATYPEUSER }} | |
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties | |
- name: Build and test with Gradle | |
env: | |
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M" | |
GRADLE_OPTS: "-Dorg.gradle.daemon=true" | |
run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: always() | |
with: | |
files: build/test-results/**/*.xml | |
- name: Post Build | |
run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json |