1515 tags : [v*]
1616
1717env :
18- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
19- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
20- SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
21- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
22- PGP_SECRET : ${{ secrets.PGP_SECRET }}
2318 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2419
20+
21+ concurrency :
22+ group : ${{ github.workflow }} @ ${{ github.ref }}
23+ cancel-in-progress : true
24+
2525jobs :
2626 build :
2727 name : Build and Test
2828 strategy :
2929 matrix :
3030 os : [ubuntu-latest]
31- scala : [2.12.17 , 2.13.10, 3.3. 3]
32- java : [temurin@8 ]
31+ scala : [2.12, 2.13, 3]
32+ java : [corretto@11 ]
3333 project : [rootJS, rootJVM, rootNative]
3434 include :
35- - scala : 3.3.3
36- java : temurin@8
35+ - scala : 3
36+ java : corretto@11
3737 project : rootNative
3838 os : macos-latest
3939 exclude :
40- - scala : 3.3.3
40+ - scala : 3
4141 project : rootJVM
42- - scala : 3.3.3
42+ - scala : 3
4343 project : rootNative
4444 os : ubuntu-latest
4545 runs-on : ${{ matrix.os }}
46+ timeout-minutes : 60
4647 steps :
4748 - name : Checkout current branch (full)
48- uses : actions/checkout@v2
49+ uses : actions/checkout@v4
4950 with :
5051 fetch-depth : 0
5152
52- - name : Download Java (temurin@8)
53- id : download-java-temurin-8
54- if : matrix.java == 'temurin@8'
55- uses : typelevel/download-java@v1
56- with :
57- distribution : temurin
58- java-version : 8
59-
60- - name : Setup Java (temurin@8)
61- if : matrix.java == 'temurin@8'
62- uses : actions/setup-java@v2
53+ - name : Setup Java (corretto@11)
54+ id : setup-java-corretto-11
55+ if : matrix.java == 'corretto@11'
56+ uses : actions/setup-java@v4
6357 with :
64- distribution : jdkfile
65- java-version : 8
66- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
58+ distribution : corretto
59+ java-version : 11
60+ cache : sbt
6761
68- - name : Cache sbt
69- uses : actions/cache@v2
70- with :
71- path : |
72- ~/.sbt
73- ~/.ivy2/cache
74- ~/.coursier/cache/v1
75- ~/.cache/coursier/v1
76- ~/AppData/Local/Coursier/Cache/v1
77- ~/Library/Caches/Coursier/v1
78- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
62+ - name : sbt update
63+ if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
64+ run : ./sbt +update
7965
8066 - name : Check that workflows are up to date
81- run : sbt githubWorkflowCheck
82-
83- - name : Check formatting
84- if : matrix.java == 'temurin@8'
85- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' scalafmtCheckAll 'project /' scalafmtSbtCheck
67+ run : ./sbt githubWorkflowCheck
8668
8769 - name : scalaJSLink
8870 if : matrix.project == 'rootJS'
89- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
71+ run : ./ sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
9072
9173 - name : nativeLink
9274 if : matrix.project == 'rootNative'
93- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
75+ run : ./ sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
9476
9577 - name : Test
96- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
78+ run : ./ sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
9779
9880 - name : Check binary compatibility
99- if : matrix.java == 'temurin@8 '
100- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
81+ if : matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest '
82+ run : ./ sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
10183
10284 - name : Generate API documentation
103- if : matrix.java == 'temurin@8 '
104- run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
85+ if : matrix.java == 'corretto@11' && matrix.os == 'ubuntu-latest '
86+ run : ./ sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
10587
10688 - name : Make target directories
10789 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
108- run : mkdir -p target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js /target project/target
90+ run : mkdir -p core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
10991
11092 - name : Compress target directories
11193 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
112- run : tar cf targets.tar target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js /target project/target
94+ run : tar cf targets.tar core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
11395
11496 - name : Upload target directories
11597 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
116- uses : actions/upload-artifact@v2
98+ uses : actions/upload-artifact@v4
11799 with :
118100 name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
119101 path : targets.tar
@@ -125,123 +107,150 @@ jobs:
125107 strategy :
126108 matrix :
127109 os : [ubuntu-latest]
128- scala : [2.13.10]
129- java : [temurin@8]
110+ java : [corretto@11]
130111 runs-on : ${{ matrix.os }}
131112 steps :
132113 - name : Checkout current branch (full)
133- uses : actions/checkout@v2
114+ uses : actions/checkout@v4
134115 with :
135116 fetch-depth : 0
136117
137- - name : Download Java (temurin@8 )
138- id : download -java-temurin-8
139- if : matrix.java == 'temurin@8 '
140- uses : typelevel/download -java@v1
118+ - name : Setup Java (corretto@11 )
119+ id : setup -java-corretto-11
120+ if : matrix.java == 'corretto@11 '
121+ uses : actions/setup -java@v4
141122 with :
142- distribution : temurin
143- java-version : 8
123+ distribution : corretto
124+ java-version : 11
125+ cache : sbt
144126
145- - name : Setup Java (temurin@8)
146- if : matrix.java == 'temurin@8'
147- uses : actions/setup-java@v2
148- with :
149- distribution : jdkfile
150- java-version : 8
151- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
127+ - name : sbt update
128+ if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
129+ run : ./sbt +update
152130
153- - name : Cache sbt
154- uses : actions/cache@v2
155- with :
156- path : |
157- ~/.sbt
158- ~/.ivy2/cache
159- ~/.coursier/cache/v1
160- ~/.cache/coursier/v1
161- ~/AppData/Local/Coursier/Cache/v1
162- ~/Library/Caches/Coursier/v1
163- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
164-
165- - name : Download target directories (2.12.17, rootJS)
166- uses : actions/download-artifact@v2
131+ - name : Download target directories (2.12, rootJS)
132+ uses : actions/download-artifact@v4
167133 with :
168- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJS
134+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
169135
170- - name : Inflate target directories (2.12.17 , rootJS)
136+ - name : Inflate target directories (2.12, rootJS)
171137 run : |
172138 tar xf targets.tar
173139 rm targets.tar
174140
175- - name : Download target directories (2.12.17 , rootJVM)
176- uses : actions/download-artifact@v2
141+ - name : Download target directories (2.12, rootJVM)
142+ uses : actions/download-artifact@v4
177143 with :
178- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJVM
144+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
179145
180- - name : Inflate target directories (2.12.17 , rootJVM)
146+ - name : Inflate target directories (2.12, rootJVM)
181147 run : |
182148 tar xf targets.tar
183149 rm targets.tar
184150
185- - name : Download target directories (2.12.17 , rootNative)
186- uses : actions/download-artifact@v2
151+ - name : Download target directories (2.12, rootNative)
152+ uses : actions/download-artifact@v4
187153 with :
188- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootNative
154+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
189155
190- - name : Inflate target directories (2.12.17 , rootNative)
156+ - name : Inflate target directories (2.12, rootNative)
191157 run : |
192158 tar xf targets.tar
193159 rm targets.tar
194160
195- - name : Download target directories (2.13.10 , rootJS)
196- uses : actions/download-artifact@v2
161+ - name : Download target directories (2.13, rootJS)
162+ uses : actions/download-artifact@v4
197163 with :
198- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJS
164+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
199165
200- - name : Inflate target directories (2.13.10 , rootJS)
166+ - name : Inflate target directories (2.13, rootJS)
201167 run : |
202168 tar xf targets.tar
203169 rm targets.tar
204170
205- - name : Download target directories (2.13.10 , rootJVM)
206- uses : actions/download-artifact@v2
171+ - name : Download target directories (2.13, rootJVM)
172+ uses : actions/download-artifact@v4
207173 with :
208- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJVM
174+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
209175
210- - name : Inflate target directories (2.13.10 , rootJVM)
176+ - name : Inflate target directories (2.13, rootJVM)
211177 run : |
212178 tar xf targets.tar
213179 rm targets.tar
214180
215- - name : Download target directories (2.13.10 , rootNative)
216- uses : actions/download-artifact@v2
181+ - name : Download target directories (2.13, rootNative)
182+ uses : actions/download-artifact@v4
217183 with :
218- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootNative
184+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
219185
220- - name : Inflate target directories (2.13.10 , rootNative)
186+ - name : Inflate target directories (2.13, rootNative)
221187 run : |
222188 tar xf targets.tar
223189 rm targets.tar
224190
225- - name : Download target directories (3.3.3 , rootJS)
226- uses : actions/download-artifact@v2
191+ - name : Download target directories (3, rootJS)
192+ uses : actions/download-artifact@v4
227193 with :
228- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.3 -rootJS
194+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
229195
230- - name : Inflate target directories (3.3.3 , rootJS)
196+ - name : Inflate target directories (3, rootJS)
231197 run : |
232198 tar xf targets.tar
233199 rm targets.tar
234200
235201 - name : Import signing key
236202 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
237- run : echo $PGP_SECRET | base64 -di | gpg --import
203+ env :
204+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
205+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
206+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
238207
239208 - name : Import signing key and strip passphrase
240209 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
210+ env :
211+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
212+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
241213 run : |
242- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
214+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
243215 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
244216 (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
245217
246218 - name : Publish
247- run : sbt '++ ${{ matrix.scala }}' tlRelease
219+ env :
220+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
221+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
222+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
223+ run : ./sbt tlCiRelease
224+
225+ dependency-submission :
226+ name : Submit Dependencies
227+ if : github.event_name != 'pull_request'
228+ strategy :
229+ matrix :
230+ os : [ubuntu-latest]
231+ java : [corretto@11]
232+ runs-on : ${{ matrix.os }}
233+ steps :
234+ - name : Checkout current branch (full)
235+ uses : actions/checkout@v4
236+ with :
237+ fetch-depth : 0
238+
239+ - name : Setup Java (corretto@11)
240+ id : setup-java-corretto-11
241+ if : matrix.java == 'corretto@11'
242+ uses : actions/setup-java@v4
243+ with :
244+ distribution : corretto
245+ java-version : 11
246+ cache : sbt
247+
248+ - name : sbt update
249+ if : matrix.java == 'corretto@11' && steps.setup-java-corretto-11.outputs.cache-hit == 'false'
250+ run : ./sbt +update
251+
252+ - name : Submit Dependencies
253+ uses : scalacenter/sbt-dependency-submission@v2
254+ with :
255+ modules-ignore : rootjs_2.12 rootjs_2.13 rootjs_3 tests_sjs1_2.12 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 demo_2.12 demo_2.13 demo_3 tests_2.12 tests_2.13 tests_3 demo_native0.4_2.12 demo_native0.4_2.13 demo_native0.4_3 tests_native0.4_2.12 tests_native0.4_2.13 tests_native0.4_3 demo_sjs1_2.12 demo_sjs1_2.13 demo_sjs1_3
256+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments