Tests added. #110
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: | |
# - compile, sign, sonar project on windows with JDK 17 | |
# - deploy snapshot on maven and upload on FTP | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
deploy: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
jdk: [17] | |
runs-on: ${{ matrix.os }} | |
env: | |
JDK_VERSION: ${{ matrix.jdk }} | |
AUDIODEV: "null" | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ matrix.os }}-java${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/app/build.gradle') }} | |
restore-keys: | | |
maven-${{ matrix.os }}-java${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/app/build.gradle') }} | |
- name: Maven | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: 3.9.6 | |
- name: JDK | |
uses: actions/[email protected] | |
with: | |
java-version: | | |
${{ matrix.jdk }} | |
distribution: 'temurin' | |
mvn-toolchain-id: | | |
JavaSE-17 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Decode Keystore | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'android.jks' | |
fileDir: 'app/' | |
encodedString: ${{ secrets.KEYSTORE_BASE64 }} | |
- name: GPG | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Deploy | |
uses: coactions/[email protected] | |
with: | |
run: mvn clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file lionengine-parent/pom.xml -U -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psign -Dsonar.organization=b3dgs -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.projectKey=b3dgs_lionengine | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Upload Editor Repository | |
uses: SamKirkland/[email protected] | |
with: | |
server: ftp.b3dgs.com | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
local-dir: com.b3dgs.lionengine.editor.repository/target/repository/ | |
- name: Prepare Editor Product | |
run: | | |
rmdir /s /q com.b3dgs.lionengine.editor.product\target\products\com.b3dgs.lionengine.editor.product | |
shell: cmd | |
- name: Upload Editor Product | |
uses: dennisameling/[email protected] | |
with: | |
server: ftp.b3dgs.com | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
local_dir: com.b3dgs.lionengine.editor.product/target/products/ | |
server_dir: /product/ | |
secure: false | |
- name: Deploy Android | |
run: | | |
cd lionengine-core-android | |
gradlew publishAllPublicationsToMavenRepository -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -PMAVEN_USERNAME=${{ secrets.MAVEN_USERNAME }} -PMAVEN_PASSWORD=${{ secrets.MAVEN_PASSWORD }} -Pkeystore=android.jks -Pkeystore.alias=${{ secrets.KEYSTORE_ALIAS }} -Pkeystore.storepassword=${{ secrets.KEYSTORE_STOREPASS }} -Pkeystore.password=${{ secrets.KEYSTORE_PASS }} | |
shell: cmd |