diff --git a/.gitattributes b/.gitattributes index 296a416d..c80efdd8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ -# Common settings that generally should always be used with your language specific settings +# https://help.github.com/articles/dealing-with-line-endings/ +# https://github.com/alexkaratarakis/gitattributes -# Auto detect text files and perform LF normalization -* text eol=lf +* text=auto # The above will handle all files NOT found below @@ -44,12 +44,14 @@ *.cmd text eol=crlf *.ps1 text eol=crlf - -# JVM sources -*.java text diff=java -*.gradle text diff=java -*.kt text diff=java -*.kts text diff=java +# JVM +*.java text diff=java +*.gradle text diff=java +*.java text diff=java +*.kt text diff=kotlin +*.kts text diff=kotlin +*.properties text +*.jar binary # Text files where line endings should be preserved *.patch -text diff --git a/.github/workflows/run_gradle_task.yml b/.github/workflows/run_gradle_task.yml index 276aa589..452e7aa6 100644 --- a/.github/workflows/run_gradle_task.yml +++ b/.github/workflows/run_gradle_task.yml @@ -58,7 +58,7 @@ jobs: - name: Checkout the repo uses: actions/checkout@v3 with: - ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }} + ref: ${{ inputs.checkout-ref || github.ref }} - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/run_publish_maven.yml b/.github/workflows/run_publish_maven.yml index 4cc92622..419d1a41 100644 --- a/.github/workflows/run_publish_maven.yml +++ b/.github/workflows/run_publish_maven.yml @@ -30,6 +30,7 @@ permissions: jobs: sonatype-release: + if: github.ref == 'refs/heads/main' permissions: contents: read packages: write @@ -40,4 +41,4 @@ jobs: runs-on: macos-latest # only macOS supports building all Kotlin targets gradle-task: >- publishAllPublicationsToSonatypeReleaseRepository --stacktrace --no-configuration-cache --no-parallel - checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }} + checkout-ref: ${{ inputs.checkout-ref }} diff --git a/.github/workflows/run_publish_site.yml b/.github/workflows/run_publish_site.yml index 172a5991..638a4a60 100644 --- a/.github/workflows/run_publish_site.yml +++ b/.github/workflows/run_publish_site.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout the repo uses: actions/checkout@v3 with: - ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }} + ref: ${{ inputs.checkout-ref || github.ref }} - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 870e9438..48319cad 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,9 +1,11 @@ name: Tests + on: workflow_dispatch: workflow_call: + concurrency: group: "Tests: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" cancel-in-progress: true diff --git a/.github/workflows/workflow_release.yml b/.github/workflows/workflow_release.yml index 04ddda47..6c52cdf2 100644 --- a/.github/workflows/workflow_release.yml +++ b/.github/workflows/workflow_release.yml @@ -37,7 +37,7 @@ jobs: contents: write packages: write with: - checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }} + checkout-ref: ${{ inputs.checkout-ref }} publish-site: needs: tests @@ -51,4 +51,4 @@ jobs: packages: write pages: write # to deploy to Pages with: - checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }} + checkout-ref: ${{ inputs.checkout-ref }} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 933486d8..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ