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 :
27- name : Build and Test
27+ name : Test
2828 strategy :
2929 matrix :
30- os : [ubuntu-latest ]
31- scala : [3.2.2 , 2.12.17 , 2.13.10 ]
30+ os : [ubuntu-22.04 ]
31+ scala : [3, 2.12, 2.13]
3232 java : [temurin@8]
3333 project : [rootJS, rootJVM, rootNative]
3434 runs-on : ${{ matrix.os }}
35+ timeout-minutes : 60
3536 steps :
3637 - name : Checkout current branch (full)
37- uses : actions/checkout@v3
38+ uses : actions/checkout@v5
3839 with :
3940 fetch-depth : 0
4041
41- - name : Download Java (temurin@8)
42- id : download-java-temurin-8
43- if : matrix.java == 'temurin@8'
44- uses : typelevel/download-java@v2
45- with :
46- distribution : temurin
47- java-version : 8
42+ - name : Setup sbt
43+ uses : sbt/setup-sbt@v1
4844
4945 - name : Setup Java (temurin@8)
46+ id : setup-java-temurin-8
5047 if : matrix.java == 'temurin@8'
51- uses : actions/setup-java@v3
48+ uses : actions/setup-java@v5
5249 with :
53- distribution : jdkfile
50+ distribution : temurin
5451 java-version : 8
55- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
52+ cache : sbt
5653
57- - name : Cache sbt
58- uses : actions/cache@v3
59- with :
60- path : |
61- ~/.sbt
62- ~/.ivy2/cache
63- ~/.coursier/cache/v1
64- ~/.cache/coursier/v1
65- ~/AppData/Local/Coursier/Cache/v1
66- ~/Library/Caches/Coursier/v1
67- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
54+ - name : sbt update
55+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
56+ run : sbt +update
6857
6958 - name : Check that workflows are up to date
7059 run : sbt githubWorkflowCheck
7160
7261 - name : Check headers and formatting
73- if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest '
62+ if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04 '
7463 run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
7564
7665 - name : scalaJSLink
@@ -85,24 +74,24 @@ jobs:
8574 run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
8675
8776 - name : Check binary compatibility
88- if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest '
77+ if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04 '
8978 run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
9079
9180 - name : Generate API documentation
92- if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest '
81+ if : matrix.java == 'temurin@8' && matrix.os == 'ubuntu-22.04 '
9382 run : sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
9483
9584 - name : Make target directories
9685 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
97- run : mkdir -p target .js/target core/native/target core/js/target core/jvm/target .jvm/target .native /target project/target
86+ run : mkdir -p core/native/target core/js/target core/jvm/target project/target
9887
9988 - name : Compress target directories
10089 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
101- run : tar cf targets.tar target .js/target core/native/target core/js/target core/jvm/target .jvm/target .native /target project/target
90+ run : tar cf targets.tar core/native/target core/js/target core/jvm/target project/target
10291
10392 - name : Upload target directories
10493 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
105- uses : actions/upload-artifact@v3
94+ uses : actions/upload-artifact@v5
10695 with :
10796 name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
10897 path : targets.tar
@@ -113,144 +102,177 @@ jobs:
113102 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
114103 strategy :
115104 matrix :
116- os : [ubuntu-latest]
117- scala : [3.2.2]
105+ os : [ubuntu-22.04]
118106 java : [temurin@8]
119107 runs-on : ${{ matrix.os }}
120108 steps :
121109 - name : Checkout current branch (full)
122- uses : actions/checkout@v3
110+ uses : actions/checkout@v5
123111 with :
124112 fetch-depth : 0
125113
126- - name : Download Java (temurin@8)
127- id : download-java-temurin-8
128- if : matrix.java == 'temurin@8'
129- uses : typelevel/download-java@v2
130- with :
131- distribution : temurin
132- java-version : 8
114+ - name : Setup sbt
115+ uses : sbt/setup-sbt@v1
133116
134117 - name : Setup Java (temurin@8)
118+ id : setup-java-temurin-8
135119 if : matrix.java == 'temurin@8'
136- uses : actions/setup-java@v3
120+ uses : actions/setup-java@v5
137121 with :
138- distribution : jdkfile
122+ distribution : temurin
139123 java-version : 8
140- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
124+ cache : sbt
141125
142- - name : Cache sbt
143- uses : actions/cache@v3
144- with :
145- path : |
146- ~/.sbt
147- ~/.ivy2/cache
148- ~/.coursier/cache/v1
149- ~/.cache/coursier/v1
150- ~/AppData/Local/Coursier/Cache/v1
151- ~/Library/Caches/Coursier/v1
152- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
153-
154- - name : Download target directories (3.2.2, rootJS)
155- uses : actions/download-artifact@v3
126+ - name : sbt update
127+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
128+ run : sbt +update
129+
130+ - name : Download target directories (3, rootJS)
131+ uses : actions/download-artifact@v6
156132 with :
157- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2 -rootJS
133+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
158134
159- - name : Inflate target directories (3.2.2 , rootJS)
135+ - name : Inflate target directories (3, rootJS)
160136 run : |
161137 tar xf targets.tar
162138 rm targets.tar
163139
164- - name : Download target directories (3.2.2 , rootJVM)
165- uses : actions/download-artifact@v3
140+ - name : Download target directories (3, rootJVM)
141+ uses : actions/download-artifact@v6
166142 with :
167- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2 -rootJVM
143+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
168144
169- - name : Inflate target directories (3.2.2 , rootJVM)
145+ - name : Inflate target directories (3, rootJVM)
170146 run : |
171147 tar xf targets.tar
172148 rm targets.tar
173149
174- - name : Download target directories (3.2.2 , rootNative)
175- uses : actions/download-artifact@v3
150+ - name : Download target directories (3, rootNative)
151+ uses : actions/download-artifact@v6
176152 with :
177- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.2 -rootNative
153+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
178154
179- - name : Inflate target directories (3.2.2 , rootNative)
155+ - name : Inflate target directories (3, rootNative)
180156 run : |
181157 tar xf targets.tar
182158 rm targets.tar
183159
184- - name : Download target directories (2.12.17 , rootJS)
185- uses : actions/download-artifact@v3
160+ - name : Download target directories (2.12, rootJS)
161+ uses : actions/download-artifact@v6
186162 with :
187- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJS
163+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
188164
189- - name : Inflate target directories (2.12.17 , rootJS)
165+ - name : Inflate target directories (2.12, rootJS)
190166 run : |
191167 tar xf targets.tar
192168 rm targets.tar
193169
194- - name : Download target directories (2.12.17 , rootJVM)
195- uses : actions/download-artifact@v3
170+ - name : Download target directories (2.12, rootJVM)
171+ uses : actions/download-artifact@v6
196172 with :
197- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJVM
173+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
198174
199- - name : Inflate target directories (2.12.17 , rootJVM)
175+ - name : Inflate target directories (2.12, rootJVM)
200176 run : |
201177 tar xf targets.tar
202178 rm targets.tar
203179
204- - name : Download target directories (2.12.17 , rootNative)
205- uses : actions/download-artifact@v3
180+ - name : Download target directories (2.12, rootNative)
181+ uses : actions/download-artifact@v6
206182 with :
207- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootNative
183+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
208184
209- - name : Inflate target directories (2.12.17 , rootNative)
185+ - name : Inflate target directories (2.12, rootNative)
210186 run : |
211187 tar xf targets.tar
212188 rm targets.tar
213189
214- - name : Download target directories (2.13.10 , rootJS)
215- uses : actions/download-artifact@v3
190+ - name : Download target directories (2.13, rootJS)
191+ uses : actions/download-artifact@v6
216192 with :
217- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJS
193+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
218194
219- - name : Inflate target directories (2.13.10 , rootJS)
195+ - name : Inflate target directories (2.13, rootJS)
220196 run : |
221197 tar xf targets.tar
222198 rm targets.tar
223199
224- - name : Download target directories (2.13.10 , rootJVM)
225- uses : actions/download-artifact@v3
200+ - name : Download target directories (2.13, rootJVM)
201+ uses : actions/download-artifact@v6
226202 with :
227- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJVM
203+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
228204
229- - name : Inflate target directories (2.13.10 , rootJVM)
205+ - name : Inflate target directories (2.13, rootJVM)
230206 run : |
231207 tar xf targets.tar
232208 rm targets.tar
233209
234- - name : Download target directories (2.13.10 , rootNative)
235- uses : actions/download-artifact@v3
210+ - name : Download target directories (2.13, rootNative)
211+ uses : actions/download-artifact@v6
236212 with :
237- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootNative
213+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
238214
239- - name : Inflate target directories (2.13.10 , rootNative)
215+ - name : Inflate target directories (2.13, rootNative)
240216 run : |
241217 tar xf targets.tar
242218 rm targets.tar
243219
244220 - name : Import signing key
245221 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
246- run : echo $PGP_SECRET | base64 -di | gpg --import
222+ env :
223+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
224+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
225+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
247226
248227 - name : Import signing key and strip passphrase
249228 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
229+ env :
230+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
231+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
250232 run : |
251- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
233+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
252234 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
253235 (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)
254236
255237 - name : Publish
256- run : sbt '++ ${{ matrix.scala }}' tlCiRelease
238+ env :
239+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
240+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
241+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
242+ run : sbt tlCiRelease
243+
244+ dependency-submission :
245+ name : Submit Dependencies
246+ if : github.event.repository.fork == false && github.event_name != 'pull_request'
247+ strategy :
248+ matrix :
249+ os : [ubuntu-22.04]
250+ java : [temurin@8]
251+ runs-on : ${{ matrix.os }}
252+ steps :
253+ - name : Checkout current branch (full)
254+ uses : actions/checkout@v5
255+ with :
256+ fetch-depth : 0
257+
258+ - name : Setup sbt
259+ uses : sbt/setup-sbt@v1
260+
261+ - name : Setup Java (temurin@8)
262+ id : setup-java-temurin-8
263+ if : matrix.java == 'temurin@8'
264+ uses : actions/setup-java@v5
265+ with :
266+ distribution : temurin
267+ java-version : 8
268+ cache : sbt
269+
270+ - name : sbt update
271+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
272+ run : sbt +update
273+
274+ - name : Submit Dependencies
275+ uses : scalacenter/sbt-dependency-submission@v2
276+ with :
277+ modules-ignore : rootjs_3 rootjs_2.12 rootjs_2.13 rootjvm_3 rootjvm_2.12 rootjvm_2.13 rootnative_3 rootnative_2.12 rootnative_2.13
278+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments