Update README.md #77
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 and sign project on windows with JDK 17 | |
# - run sonar on linux | |
# - deploy snapshot on maven | |
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 }}- | |
maven-${{ matrix.os }}- | |
- 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 --file lionengine-parent/pom.xml -U -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psign | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
- 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 | |
sonar: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-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') }} | |
restore-keys: | | |
maven-${{ matrix.os }}-java${{ matrix.jdk }}- | |
maven-${{ matrix.os }}- | |
- 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 | |
- name: Sonar | |
uses: coactions/[email protected] | |
with: | |
run: mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file lionengine-parent/pom.xml -U -Dsonar.organization=b3dgs -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.projectKey=b3dgs_lionengine | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |