Skip to content

Fixed Plugin Repos #127

Fixed Plugin Repos

Fixed Plugin Repos #127

Workflow file for this run

name: Sonar
on:
push:
branches: [ develop ]
workflow_dispatch:
jobs:
linuxbuild:
name: testbuild
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v2
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup Java Zulu 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Extract Version
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'
- name: Set Version Release
run: |
mvn -B versions:set -DnewVersion="${{steps.version.outputs.full_without_prefix}}"
echo -n "${{steps.version.outputs.full_without_prefix}}" > ./core/src/main/resources/org/correomqtt/core/utils/version.txt
if: steps.version.outputs.is_valid == 'true'
shell: bash
- name: Set Version Test
run: |
mvn -B versions:set -DnewVersion="0.0.1"
echo -n "0.0.1" > ./core/src/main/resources/org/correomqtt/core/utils/version.txt
shell: bash
if: steps.version.outputs.is_valid != 'true'
- name: Build
run: |
mvn -B clean install -DskipTests=true
shell: bash
- name: Sonar Cloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=correomqtt-farion