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.2.1 ]
31+ scala : [2.12, 2.13, 3]
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@v4
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
48-
4942 - name : Setup Java (temurin@8)
43+ id : setup-java-temurin-8
5044 if : matrix.java == 'temurin@8'
51- uses : actions/setup-java@v3
45+ uses : actions/setup-java@v4
5246 with :
53- distribution : jdkfile
47+ distribution : temurin
5448 java-version : 8
55- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
49+ cache : sbt
5650
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') }}
51+ - name : sbt update
52+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
53+ run : sbt +update
6854
6955 - name : Check that workflows are up to date
7056 run : sbt githubWorkflowCheck
@@ -94,15 +80,15 @@ jobs:
9480
9581 - name : Make target directories
9682 if : github.event_name != 'pull_request' && (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
83+ run : mkdir -p core/.native/target core/.js/target core/.jvm/target project/target
9884
9985 - name : Compress target directories
10086 if : github.event_name != 'pull_request' && (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
87+ run : tar cf targets.tar core/.native/target core/.js/target core/.jvm/target project/target
10288
10389 - name : Upload target directories
10490 if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
105- uses : actions/upload-artifact@v3
91+ uses : actions/upload-artifact@v4
10692 with :
10793 name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
10894 path : targets.tar
@@ -114,143 +100,170 @@ jobs:
114100 strategy :
115101 matrix :
116102 os : [ubuntu-latest]
117- scala : [3.2.1]
118103 java : [temurin@8]
119104 runs-on : ${{ matrix.os }}
120105 steps :
121106 - name : Checkout current branch (full)
122- uses : actions/checkout@v3
107+ uses : actions/checkout@v4
123108 with :
124109 fetch-depth : 0
125110
126- - name : Download Java (temurin@8)
127- id : download -java-temurin-8
111+ - name : Setup Java (temurin@8)
112+ id : setup -java-temurin-8
128113 if : matrix.java == 'temurin@8'
129- uses : typelevel/download -java@v2
114+ uses : actions/setup -java@v4
130115 with :
131116 distribution : temurin
132117 java-version : 8
118+ cache : sbt
133119
134- - name : Setup Java (temurin@8)
135- if : matrix.java == 'temurin@8'
136- uses : actions/setup-java@v3
137- with :
138- distribution : jdkfile
139- java-version : 8
140- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
120+ - name : sbt update
121+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
122+ run : sbt +update
141123
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 (2.12.17, rootJS)
155- uses : actions/download-artifact@v3
124+ - name : Download target directories (2.12, rootJS)
125+ uses : actions/download-artifact@v4
156126 with :
157- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJS
127+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
158128
159- - name : Inflate target directories (2.12.17 , rootJS)
129+ - name : Inflate target directories (2.12, rootJS)
160130 run : |
161131 tar xf targets.tar
162132 rm targets.tar
163133
164- - name : Download target directories (2.12.17 , rootJVM)
165- uses : actions/download-artifact@v3
134+ - name : Download target directories (2.12, rootJVM)
135+ uses : actions/download-artifact@v4
166136 with :
167- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJVM
137+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
168138
169- - name : Inflate target directories (2.12.17 , rootJVM)
139+ - name : Inflate target directories (2.12, rootJVM)
170140 run : |
171141 tar xf targets.tar
172142 rm targets.tar
173143
174- - name : Download target directories (2.12.17 , rootNative)
175- uses : actions/download-artifact@v3
144+ - name : Download target directories (2.12, rootNative)
145+ uses : actions/download-artifact@v4
176146 with :
177- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootNative
147+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
178148
179- - name : Inflate target directories (2.12.17 , rootNative)
149+ - name : Inflate target directories (2.12, rootNative)
180150 run : |
181151 tar xf targets.tar
182152 rm targets.tar
183153
184- - name : Download target directories (2.13.10 , rootJS)
185- uses : actions/download-artifact@v3
154+ - name : Download target directories (2.13, rootJS)
155+ uses : actions/download-artifact@v4
186156 with :
187- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJS
157+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
188158
189- - name : Inflate target directories (2.13.10 , rootJS)
159+ - name : Inflate target directories (2.13, rootJS)
190160 run : |
191161 tar xf targets.tar
192162 rm targets.tar
193163
194- - name : Download target directories (2.13.10 , rootJVM)
195- uses : actions/download-artifact@v3
164+ - name : Download target directories (2.13, rootJVM)
165+ uses : actions/download-artifact@v4
196166 with :
197- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJVM
167+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
198168
199- - name : Inflate target directories (2.13.10 , rootJVM)
169+ - name : Inflate target directories (2.13, rootJVM)
200170 run : |
201171 tar xf targets.tar
202172 rm targets.tar
203173
204- - name : Download target directories (2.13.10 , rootNative)
205- uses : actions/download-artifact@v3
174+ - name : Download target directories (2.13, rootNative)
175+ uses : actions/download-artifact@v4
206176 with :
207- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootNative
177+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
208178
209- - name : Inflate target directories (2.13.10 , rootNative)
179+ - name : Inflate target directories (2.13, rootNative)
210180 run : |
211181 tar xf targets.tar
212182 rm targets.tar
213183
214- - name : Download target directories (3.2.1 , rootJS)
215- uses : actions/download-artifact@v3
184+ - name : Download target directories (3, rootJS)
185+ uses : actions/download-artifact@v4
216186 with :
217- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.1 -rootJS
187+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
218188
219- - name : Inflate target directories (3.2.1 , rootJS)
189+ - name : Inflate target directories (3, rootJS)
220190 run : |
221191 tar xf targets.tar
222192 rm targets.tar
223193
224- - name : Download target directories (3.2.1 , rootJVM)
225- uses : actions/download-artifact@v3
194+ - name : Download target directories (3, rootJVM)
195+ uses : actions/download-artifact@v4
226196 with :
227- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.1 -rootJVM
197+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
228198
229- - name : Inflate target directories (3.2.1 , rootJVM)
199+ - name : Inflate target directories (3, rootJVM)
230200 run : |
231201 tar xf targets.tar
232202 rm targets.tar
233203
234- - name : Download target directories (3.2.1 , rootNative)
235- uses : actions/download-artifact@v3
204+ - name : Download target directories (3, rootNative)
205+ uses : actions/download-artifact@v4
236206 with :
237- name : target-${{ matrix.os }}-${{ matrix.java }}-3.2.1 -rootNative
207+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
238208
239- - name : Inflate target directories (3.2.1 , rootNative)
209+ - name : Inflate target directories (3, rootNative)
240210 run : |
241211 tar xf targets.tar
242212 rm targets.tar
243213
244214 - name : Import signing key
245215 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
246- run : echo $PGP_SECRET | base64 -di | gpg --import
216+ env :
217+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
218+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
219+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
247220
248221 - name : Import signing key and strip passphrase
249222 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
223+ env :
224+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
225+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
250226 run : |
251- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
227+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
252228 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
253229 (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)
254230
255231 - name : Publish
256- run : sbt '++ ${{ matrix.scala }}' tlCiRelease
232+ env :
233+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
234+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
235+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
236+ run : sbt tlCiRelease
237+
238+ dependency-submission :
239+ name : Submit Dependencies
240+ if : github.event_name != 'pull_request'
241+ strategy :
242+ matrix :
243+ os : [ubuntu-latest]
244+ java : [temurin@8]
245+ runs-on : ${{ matrix.os }}
246+ steps :
247+ - name : Checkout current branch (full)
248+ uses : actions/checkout@v4
249+ with :
250+ fetch-depth : 0
251+
252+ - name : Setup Java (temurin@8)
253+ id : setup-java-temurin-8
254+ if : matrix.java == 'temurin@8'
255+ uses : actions/setup-java@v4
256+ with :
257+ distribution : temurin
258+ java-version : 8
259+ cache : sbt
260+
261+ - name : sbt update
262+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
263+ run : sbt +update
264+
265+ - name : Submit Dependencies
266+ uses : scalacenter/sbt-dependency-submission@v2
267+ with :
268+ modules-ignore : discipline_2.12 discipline_2.13 discipline_3 discipline_2.12 discipline_2.13 discipline_3 discipline_2.12 discipline_2.13 discipline_3
269+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments