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 ]
30+ os : [ubuntu-22.04 ]
3131 scala : [3, 2.13, 2.12]
3232 java : [temurin@17]
3333 runs-on : ${{ matrix.os }}
34+ timeout-minutes : 60
3435 steps :
3536 - name : Checkout current branch (full)
36- uses : actions/checkout@v3
37+ uses : actions/checkout@v5
3738 with :
3839 fetch-depth : 0
3940
40- - name : Download Java (temurin@17)
41- id : download-java-temurin-17
42- if : matrix.java == 'temurin@17'
43- uses : typelevel/download-java@v2
44- with :
45- distribution : temurin
46- java-version : 17
41+ - name : Setup sbt
42+ uses : sbt/setup-sbt@v1
4743
4844 - name : Setup Java (temurin@17)
45+ id : setup-java-temurin-17
4946 if : matrix.java == 'temurin@17'
50- uses : actions/setup-java@v3
47+ uses : actions/setup-java@v5
5148 with :
52- distribution : jdkfile
49+ distribution : temurin
5350 java-version : 17
54- jdkFile : ${{ steps.download-java-temurin-17.outputs.jdkFile }}
51+ cache : sbt
5552
56- - name : Cache sbt
57- uses : actions/cache@v3
58- with :
59- path : |
60- ~/.sbt
61- ~/.ivy2/cache
62- ~/.coursier/cache/v1
63- ~/.cache/coursier/v1
64- ~/AppData/Local/Coursier/Cache/v1
65- ~/Library/Caches/Coursier/v1
66- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
53+ - name : sbt update
54+ if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
55+ run : sbt +update
6756
6857 - name : Check that workflows are up to date
6958 run : sbt githubWorkflowCheck
@@ -72,24 +61,24 @@ jobs:
7261 run : sbt '++ ${{ matrix.scala }}' test
7362
7463 - name : Check binary compatibility
75- if : matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest '
64+ if : matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04 '
7665 run : sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues
7766
7867 - name : Generate API documentation
79- if : matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest '
68+ if : matrix.java == 'temurin@17' && matrix.os == 'ubuntu-22.04 '
8069 run : sbt '++ ${{ matrix.scala }}' doc
8170
8271 - name : Make target directories
8372 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
84- run : mkdir -p target core/js/target core/jvm/target core/native/target project/target
73+ run : mkdir -p core/js/target core/jvm/target core/native/target project/target
8574
8675 - name : Compress target directories
8776 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
88- run : tar cf targets.tar target core/js/target core/jvm/target core/native/target project/target
77+ run : tar cf targets.tar core/js/target core/jvm/target core/native/target project/target
8978
9079 - name : Upload target directories
9180 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
92- uses : actions/upload-artifact@v3
81+ uses : actions/upload-artifact@v4
9382 with :
9483 name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
9584 path : targets.tar
@@ -100,45 +89,33 @@ jobs:
10089 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
10190 strategy :
10291 matrix :
103- os : [ubuntu-latest ]
92+ os : [ubuntu-22.04 ]
10493 java : [temurin@17]
10594 runs-on : ${{ matrix.os }}
10695 steps :
10796 - name : Checkout current branch (full)
108- uses : actions/checkout@v3
97+ uses : actions/checkout@v5
10998 with :
11099 fetch-depth : 0
111100
112- - name : Download Java (temurin@17)
113- id : download-java-temurin-17
114- if : matrix.java == 'temurin@17'
115- uses : typelevel/download-java@v2
116- with :
117- distribution : temurin
118- java-version : 17
101+ - name : Setup sbt
102+ uses : sbt/setup-sbt@v1
119103
120104 - name : Setup Java (temurin@17)
105+ id : setup-java-temurin-17
121106 if : matrix.java == 'temurin@17'
122- uses : actions/setup-java@v3
107+ uses : actions/setup-java@v5
123108 with :
124- distribution : jdkfile
109+ distribution : temurin
125110 java-version : 17
126- jdkFile : ${{ steps.download-java-temurin-17.outputs.jdkFile }}
111+ cache : sbt
127112
128- - name : Cache sbt
129- uses : actions/cache@v3
130- with :
131- path : |
132- ~/.sbt
133- ~/.ivy2/cache
134- ~/.coursier/cache/v1
135- ~/.cache/coursier/v1
136- ~/AppData/Local/Coursier/Cache/v1
137- ~/Library/Caches/Coursier/v1
138- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
113+ - name : sbt update
114+ if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
115+ run : sbt +update
139116
140117 - name : Download target directories (3)
141- uses : actions/download-artifact@v3
118+ uses : actions/download-artifact@v4
142119 with :
143120 name : target-${{ matrix.os }}-${{ matrix.java }}-3
144121
@@ -148,7 +125,7 @@ jobs:
148125 rm targets.tar
149126
150127 - name : Download target directories (2.13)
151- uses : actions/download-artifact@v3
128+ uses : actions/download-artifact@v4
152129 with :
153130 name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
154131
@@ -158,7 +135,7 @@ jobs:
158135 rm targets.tar
159136
160137 - name : Download target directories (2.12)
161- uses : actions/download-artifact@v3
138+ uses : actions/download-artifact@v4
162139 with :
163140 name : target-${{ matrix.os }}-${{ matrix.java }}-2.12
164141
@@ -169,14 +146,59 @@ jobs:
169146
170147 - name : Import signing key
171148 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
172- run : echo $PGP_SECRET | base64 -di | gpg --import
149+ env :
150+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
151+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
152+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
173153
174154 - name : Import signing key and strip passphrase
175155 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
156+ env :
157+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
158+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
176159 run : |
177- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
160+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
178161 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
179162 (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)
180163
181164 - name : Publish
165+ env :
166+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
167+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
168+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
182169 run : sbt tlCiRelease
170+
171+ dependency-submission :
172+ name : Submit Dependencies
173+ if : github.event.repository.fork == false && github.event_name != 'pull_request'
174+ strategy :
175+ matrix :
176+ os : [ubuntu-22.04]
177+ java : [temurin@17]
178+ runs-on : ${{ matrix.os }}
179+ steps :
180+ - name : Checkout current branch (full)
181+ uses : actions/checkout@v5
182+ with :
183+ fetch-depth : 0
184+
185+ - name : Setup sbt
186+ uses : sbt/setup-sbt@v1
187+
188+ - name : Setup Java (temurin@17)
189+ id : setup-java-temurin-17
190+ if : matrix.java == 'temurin@17'
191+ uses : actions/setup-java@v5
192+ with :
193+ distribution : temurin
194+ java-version : 17
195+ cache : sbt
196+
197+ - name : sbt update
198+ if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
199+ run : sbt +update
200+
201+ - name : Submit Dependencies
202+ uses : scalacenter/sbt-dependency-submission@v2
203+ with :
204+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments