File tree Expand file tree Collapse file tree 7 files changed +19
-14
lines changed Expand file tree Collapse file tree 7 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 1- # Common settings that generally should always be used with your language specific settings
1+ # https://help.github.com/articles/dealing-with-line-endings/
2+ # https://github.com/alexkaratarakis/gitattributes
23
3- # Auto detect text files and perform LF normalization
4- * text eol =lf
4+ * text =auto
55
66# The above will handle all files NOT found below
77
4444* .cmd text eol =crlf
4545* .ps1 text eol =crlf
4646
47-
48- # JVM sources
49- * .java text diff =java
50- * .gradle text diff =java
51- * .kt text diff =java
52- * .kts text diff =java
47+ # JVM
48+ * .java text diff =java
49+ * .gradle text diff =java
50+ * .java text diff =java
51+ * .kt text diff =kotlin
52+ * .kts text diff =kotlin
53+ * .properties text
54+ * .jar binary
5355
5456# Text files where line endings should be preserved
5557* .patch - text
Original file line number Diff line number Diff line change 5858 - name : Checkout the repo
5959 uses : actions/checkout@v3
6060 with :
61- ref : ${{ inputs.checkout-ref || github.event.repository.default_branch }}
61+ ref : ${{ inputs.checkout-ref || github.ref }}
6262
6363 - name : Validate Gradle Wrapper
6464 uses : gradle/wrapper-validation-action@v1
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ permissions:
3030jobs :
3131
3232 sonatype-release :
33+ if : github.ref == 'refs/heads/main'
3334 permissions :
3435 contents : read
3536 packages : write
4041 runs-on : macos-latest # only macOS supports building all Kotlin targets
4142 gradle-task : >-
4243 publishAllPublicationsToSonatypeReleaseRepository --stacktrace --no-configuration-cache --no-parallel
43- checkout-ref : ${{ inputs.checkout-ref || github.event.repository.default_branch }}
44+ checkout-ref : ${{ inputs.checkout-ref }}
Original file line number Diff line number Diff line change 2929 - name : Checkout the repo
3030 uses : actions/checkout@v3
3131 with :
32- ref : ${{ inputs.checkout-ref || github.event.repository.default_branch }}
32+ ref : ${{ inputs.checkout-ref || github.ref }}
3333
3434 - name : Validate Gradle Wrapper
3535 uses : gradle/wrapper-validation-action@v1
Original file line number Diff line number Diff line change 11name : Tests
22
3+
34on :
45 workflow_dispatch :
56 workflow_call :
67
8+
79concurrency :
810 group : " Tests: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
911 cancel-in-progress : true
Original file line number Diff line number Diff line change 3737 contents : write
3838 packages : write
3939 with :
40- checkout-ref : ${{ inputs.checkout-ref || github.event.repository.default_branch }}
40+ checkout-ref : ${{ inputs.checkout-ref }}
4141
4242 publish-site :
4343 needs : tests
5151 packages : write
5252 pages : write # to deploy to Pages
5353 with :
54- checkout-ref : ${{ inputs.checkout-ref || github.event.repository.default_branch }}
54+ checkout-ref : ${{ inputs.checkout-ref }}
You can’t perform that action at this time.
0 commit comments