diff --git a/.github/workflows/license-scan.yml b/.github/workflows/license-scan.yml index b2e102e99..5b9497e49 100644 --- a/.github/workflows/license-scan.yml +++ b/.github/workflows/license-scan.yml @@ -41,24 +41,26 @@ jobs: CHANGED_FILES_COUNT=$(git status --short | wc -l) CHANGED_FILES_COUNT=${CHANGED_FILES_COUNT//[[:space:]]/} echo "Number of changed files: ${CHANGED_FILES_COUNT}" - if [ "$CHANGED_FILES_COUNT" -eq 1 ]; then - DEPENDENCY_FILE=".3rd-party/DEPENDENCIES" - DEPENDENCIES_MODIFIED=$(git status --short | grep ".3rd-party/DEPENDENCIES") - # Check if the file is modified - if [[ -n "$DEPENDENCIES_MODIFIED" ]]; then - echo "${DEPENDENCY_FILE} changed - commit it" - git config --local user.name "github-actions[bot]" - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git add ${DEPENDENCY_FILE} && git commit -m "[Release] Automated commit of ${DEPENDENCY_FILE} changes" && git push - else - echo "Unexpected changes:" - git status --short - exit 1 - fi - else - echo "More than one file has changed:" - git status --short - exit 1 + if [ "${CHANGED_FILES_COUNT}" -ne 0 ]; then + if [ "${CHANGED_FILES_COUNT}" -eq 1 ]; then + DEPENDENCY_FILE=".3rd-party/DEPENDENCIES" + DEPENDENCIES_MODIFIED=$(git status --short | grep ".3rd-party/DEPENDENCIES") + # Check if the file is modified + if [[ -n "$DEPENDENCIES_MODIFIED" ]]; then + echo "${DEPENDENCY_FILE} changed - commit it" + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git add ${DEPENDENCY_FILE} && git commit -m "[Release] Automated commit of ${DEPENDENCY_FILE} changes" && git push + else + echo "Unexpected changes:" + git status --short + exit 1 + fi + else + echo "More than one file has changed:" + git status --short + exit 1 + fi fi # do dash.fail=true so if there are restricted dependencis the build will fail mvn license-tool:license-check -Ddash.fail=true -PcheckLicense -Ddash.iplab.token=${GITLAB_API_TOKEN} --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2da5f72f9..40aafc5e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Release ${{ github.event.inputs.revision }}" + run: echo "Releasing ${{ github.event.inputs.revision }}" + - name: Set up JDK & Maven Central credentials uses: actions/setup-java@v4 with: @@ -93,8 +96,8 @@ jobs: env: REVISION: ${{ github.event.inputs.revision }} - - name: Deploy - run: mvn deploy -Ppublish -DskipTests -Drevision=${REVISION} --batch-mode javadoc:jar + - name: "Deploy ${{ github.event.inputs.revision }}" + run: mvn deploy -Ppublish -Drevision=${REVISION} --batch-mode env: REVISION: ${{ github.event.inputs.revision }} MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }} @@ -108,4 +111,4 @@ jobs: git tag -a ${REVISION} -m "Release version ${REVISION}" && git push origin ${REVISION} fi env: - REVISION: ${{ github.event.inputs.revision }} + REVISION: ${{ github.event.inputs.revision }} \ No newline at end of file