Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
THOREL Arnaud authored and THOREL Arnaud committed Nov 28, 2023
1 parent ad46cc7 commit a07414a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -21,33 +20,20 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
- name: Build
run: mvn -ntp -B package --file pom.xml

coverage:
runs-on: ubuntu-latest
needs: [ "build" ]
steps:
- uses: codecov/codecov-action@v3
- name: Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

sonar:
runs-on: ubuntu-latest
needs: [ "build" ]
steps:
- env:
- name: Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_PROJECT: Ouest-France_${{ github.event.repository.name }}
run: mvn -ntp -B sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ vars.SONAR_ORGANIZATION }} -Dsonar.projectKey=$SONAR_PROJECT -Dsonar.branch.name=${GITHUB_REF##*/}

deploy-snapshot:
runs-on: ubuntu-latest
needs: [ "build", "sonar" ]
steps:
- env:
- name: Deploy Snapshot
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
mvn -ntp -B deploy -DskipTests=true
run: mvn -ntp -B deploy -DskipTests=true
7 changes: 3 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: main
- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -24,7 +23,7 @@ jobs:
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Release / Deploy
- name: Release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
Expand All @@ -33,5 +32,5 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email 'actions[bot]@github.com'
mvn -ntp -B release:prepare release:perform -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} -Dtag=temp_$${{ github.event.inputs.releaseVersion }}
- name: Delete Extra Tag
- name: Post-Release
run: git push --delete origin temp_$${{ github.event.inputs.releaseVersion }}

0 comments on commit a07414a

Please sign in to comment.