Skip to content

Commit

Permalink
chore(ci): fix ci and readme to remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
THOREL Arnaud authored and THOREL Arnaud committed Nov 20, 2023
1 parent c593f09 commit 160693c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 34 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build

on:
Expand All @@ -27,7 +19,7 @@ jobs:
cache: maven
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -ntp -B package --file pom.xml
- name: Code Coverage
uses: codecov/codecov-action@v3
with:
Expand All @@ -38,11 +30,9 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_PROJECT: Ouest-France_${{ github.event.repository.name }}
run: |
echo "run sonar on " ${GITHUB_REF##*/} " for project key : " $SONAR_PROJECT " and organization " ${{ vars.SONAR_ORGANIZATION }}
mvn -B package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ vars.SONAR_ORGANIZATION }} -Dsonar.projectKey=$SONAR_PROJECT -Dsonar.branch.name=${GITHUB_REF##*/}
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##*/}
- name: Deploy Snapshot
run: mvn deploy -DskipTests=true -B -s .github/deploy_settings.xml
run: mvn -ntp -B -s .github/deploy_settings.xml deploy -DskipTests=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
36 changes: 17 additions & 19 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Deploy Package

on:
Expand All @@ -14,22 +11,23 @@ jobs:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- name: Release / Deploy
run: |
git config --global user.name 'github-actions'
git config --global user.email 'actions[bot]@github.com'
mvn release:update-versions release:perform -B -s .github/deploy_settings.xml -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
env:
- uses: actions/checkout@v3
with:
ref: main
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- name: Release / Deploy
run: |
git config --global user.name 'github-actions'
git config --global user.email 'actions[bot]@github.com'
mvn -ntp -B -s .github/deploy_settings.xml release:prepare release:perform -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} -Dtag=temp_$${{ github.event.inputs.releaseVersion }}
git push --delete origin temp_$${{ github.event.inputs.releaseVersion }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ The QueryDSL is licensed under [MIT License](https://opensource.org/license/mit/
[coverage-image]: https://codecov.io/gh/ouest-france/querydsl/graph/badge.svg?token=ZLEG2TBML8
[coverage-url]: https://codecov.io/gh/ouest-france/querydsl
[maven-central-image]: https://maven-badges.herokuapp.com/maven-central/fr.ouestfrance.querydsl/querydsl/badge.svg
[maven-central-url]: http://search.maven.org/#search%7Cga%7C1%7Cfr.ouestfrance.querydsl
[maven-central-url]: https://mvnrepository.com/artifact/fr.ouestfrance.querydsl/querydsl
[sonar-image]: https://sonarcloud.io/api/project_badges/measure?project=Ouest-France_querydsl&metric=alert_status
[sonar-url]: https://sonarcloud.io/summary/new_code?id=Ouest-France_querydsl
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
<arguments>-Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true</arguments>
<arguments>-Dmaven.test.skipTests=true -Dmaven.test.skip=true</arguments>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 160693c

Please sign in to comment.