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 fail-fast : false
3030 matrix :
3131 os : [ubuntu-latest]
32- scala : [3.3.0 , 2.13.11 ]
32+ scala : [3, 2.13]
3333 java : [temurin@8]
3434 runs-on : ${{ matrix.os }}
35+ timeout-minutes : 60
3536 steps :
3637 - name : Checkout current branch (full)
3738 uses : actions/checkout@v3
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'
5145 uses : actions/setup-java@v3
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
8874 run : sbt '++ ${{ matrix.scala }}' '${{ matrix.ci }}' javafmtCheckAll
8975
9076 - name : Check scalafix lints
91- if : matrix.java == 'temurin@8' && !startsWith(matrix.scala, '3. ')
77+ if : matrix.java == 'temurin@8' && !startsWith(matrix.scala, '3')
9278 run : sbt '++ ${{ matrix.scala }}' 'scalafixAll --check'
9379
9480 - name : Check unused compile dependencies
@@ -97,11 +83,11 @@ jobs:
9783
9884 - name : Make target directories
9985 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
100- run : mkdir -p blaze-client/target target blaze-server/target examples/target http/target core/target blaze-core/target testkit /target project/target
86+ run : mkdir -p blaze-client/target blaze-server/target http/target core/target blaze-core/target project/target
10187
10288 - name : Compress target directories
10389 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
104- run : tar cf targets.tar blaze-client/target target blaze-server/target examples/target http/target core/target blaze-core/target testkit /target project/target
90+ run : tar cf targets.tar blaze-client/target blaze-server/target http/target core/target blaze-core/target project/target
10591
10692 - name : Upload target directories
10793 if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -125,78 +111,115 @@ jobs:
125111 with :
126112 fetch-depth : 0
127113
128- - name : Download Java (temurin@8)
129- id : download-java-temurin-8
130- if : matrix.java == 'temurin@8'
131- uses : typelevel/download-java@v2
132- with :
133- distribution : temurin
134- java-version : 8
135-
136114 - name : Setup Java (temurin@8)
115+ id : setup-java-temurin-8
137116 if : matrix.java == 'temurin@8'
138117 uses : actions/setup-java@v3
139118 with :
140- distribution : jdkfile
119+ distribution : temurin
141120 java-version : 8
142- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
121+ cache : sbt
143122
144- - name : Cache sbt
145- uses : actions/cache@v3
146- with :
147- path : |
148- ~/.sbt
149- ~/.ivy2/cache
150- ~/.coursier/cache/v1
151- ~/.cache/coursier/v1
152- ~/AppData/Local/Coursier/Cache/v1
153- ~/Library/Caches/Coursier/v1
154- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
155-
156- - name : Download target directories (3.3.0)
123+ - name : sbt update
124+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
125+ run : sbt +update
126+
127+ - name : Download target directories (3)
157128 uses : actions/download-artifact@v3
158129 with :
159- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.0
130+ name : target-${{ matrix.os }}-${{ matrix.java }}-3
160131
161- - name : Inflate target directories (3.3.0 )
132+ - name : Inflate target directories (3)
162133 run : |
163134 tar xf targets.tar
164135 rm targets.tar
165136
166- - name : Download target directories (2.13.11 )
137+ - name : Download target directories (2.13)
167138 uses : actions/download-artifact@v3
168139 with :
169- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.11
140+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
170141
171- - name : Inflate target directories (2.13.11 )
142+ - name : Inflate target directories (2.13)
172143 run : |
173144 tar xf targets.tar
174145 rm targets.tar
175146
176147 - name : Import signing key
177148 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
149+ env :
150+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
151+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
178152 run : echo $PGP_SECRET | base64 -di | gpg --import
179153
180154 - name : Import signing key and strip passphrase
181155 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
156+ env :
157+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
158+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
182159 run : |
183160 echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
184161 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
185162 (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)
186163
187164 - name : Publish
165+ env :
166+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
167+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
168+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
188169 run : sbt tlCiRelease
189170
171+ dependency-submission :
172+ name : Submit Dependencies
173+ if : github.event_name != 'pull_request'
174+ strategy :
175+ matrix :
176+ os : [ubuntu-latest]
177+ java : [temurin@8]
178+ runs-on : ${{ matrix.os }}
179+ steps :
180+ - name : Checkout current branch (full)
181+ uses : actions/checkout@v3
182+ with :
183+ fetch-depth : 0
184+
185+ - name : Setup Java (temurin@8)
186+ id : setup-java-temurin-8
187+ if : matrix.java == 'temurin@8'
188+ uses : actions/setup-java@v3
189+ with :
190+ distribution : temurin
191+ java-version : 8
192+ cache : sbt
193+
194+ - name : sbt update
195+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
196+ run : sbt +update
197+
198+ - name : Submit Dependencies
199+ uses : scalacenter/sbt-dependency-submission@v2
200+ with :
201+ modules-ignore : blaze_3 blaze_2.13 blaze-examples_3 blaze-examples_2.13 sbt-http4s-org-scalafix-internal_3 sbt-http4s-org-scalafix-internal_2.13 blaze-testkit_3 blaze-testkit_2.13
202+ configs-ignore : test scala-tool scala-doc-tool test-internal
203+
190204 validate-steward :
191205 name : Validate Steward Config
192206 strategy :
193207 matrix :
194208 os : [ubuntu-latest]
209+ java : [temurin@11]
195210 runs-on : ${{ matrix.os }}
196211 steps :
197212 - name : Checkout current branch (fast)
198213 uses : actions/checkout@v3
199214
215+ - name : Setup Java (temurin@11)
216+ id : setup-java-temurin-11
217+ if : matrix.java == 'temurin@11'
218+ uses : actions/setup-java@v3
219+ with :
220+ distribution : temurin
221+ java-version : 11
222+
200223 - uses : coursier/setup-action@v1
201224 with :
202225 apps : scala-steward
0 commit comments