Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
usfalami committed Jan 8, 2025
1 parent 77397f9 commit 0de0026
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
with:
java-version: '21'
distribution: 'temurin' #Eclipse Temurin
- name: Scan project
- name: Build and scan source code
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn --batch-mode --no-transfer-progress verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=oneteme_${{ github.event.repository.name }}
run: mvn --batch-mode --no-transfer-progress verify org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar -Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}
- name: Extract project version
id: mvnVer
run: echo "version=$(mvn help:evaluate -DforceStdout -Dexpression=project.version -q)" >>$GITHUB_OUTPUT
Expand All @@ -45,4 +45,4 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: mvn --batch-mode --quiet clean deploy
run: mvn --batch-mode --no-transfer-progress clean deploy
18 changes: 3 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
name: tag release
on: workflow_dispatch
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin' #Eclipse Temurin
- name: verify
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn --batch-mode --no-transfer-progress verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=oneteme_${{ github.event.repository.name }}
deploy:
needs: scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-java@v4
with:
java-version: '21'
Expand All @@ -32,7 +20,7 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} #signer=bc
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: mvn --no-transfer-progress --batch-mode -Pdeploy clean deploy
run: mvn --batch-mode --no-transfer-progress -Pdeploy clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar -Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}
- name: extract version
id: mvnVer
run: echo "version=$(mvn help:evaluate -DforceStdout -Dexpression=project.version -q)" >>$GITHUB_OUTPUT
Expand Down

0 comments on commit 0de0026

Please sign in to comment.