1- # This file was automatically generated by sbt-github-actions using the
2- # githubWorkflowGenerate task. You should add and commit this file to
3- # your git repository. It goes without saying that you shouldn't edit
4- # this file by hand! Instead, if you wish to make changes, you should
5- # change your sbt build configuration to revise the workflow description
6- # to meet your needs, then regenerate this file.
7-
8- name : Continuous Integration
1+ name : CI
92
103on :
11- pull_request :
12- branches : ['**']
134 push :
14- branches : ['**']
15- tags : [v*]
16-
17- env :
18- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5+ workflow_dispatch :
6+ schedule :
7+ - cron : ' 30 */2 * * *'
198
209
2110concurrency :
@@ -24,166 +13,17 @@ concurrency:
2413
2514jobs :
2615 build :
27- name : Build and Test
28- strategy :
29- matrix :
30- os : [ubuntu-latest]
31- scala : [2.13]
32- java : [temurin@21, temurin@17, temurin@11]
33- runs-on : ${{ matrix.os }}
34- timeout-minutes : 60
16+ runs-on : ubuntu-latest
3517 steps :
36- - name : Install sbt
37- uses : sbt/setup-sbt@v1
38-
39- - name : Checkout current branch (full)
40- uses : actions/checkout@v4
41- with :
42- fetch-depth : 0
43-
44- - name : Setup Java (temurin@21)
45- id : setup-java-temurin-21
46- if : matrix.java == 'temurin@21'
47- uses : actions/setup-java@v4
48- with :
49- distribution : temurin
50- java-version : 21
51- cache : sbt
52-
53- - name : sbt update
54- if : matrix.java == 'temurin@21' && steps.setup-java-temurin-21.outputs.cache-hit == 'false'
55- run : sbt +update
56-
57- - name : Setup Java (temurin@17)
58- id : setup-java-temurin-17
59- if : matrix.java == 'temurin@17'
60- uses : actions/setup-java@v4
18+ - uses : actions/checkout@v4
19+ - uses : actions/setup-java@v4
6120 with :
62- distribution : temurin
63- java-version : 17
64- cache : sbt
65-
66- - name : sbt update
67- if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
68- run : sbt +update
69-
70- - name : Setup Java (temurin@11)
71- id : setup-java-temurin-11
72- if : matrix.java == 'temurin@11'
73- uses : actions/setup-java@v4
74- with :
75- distribution : temurin
7621 java-version : 11
22+ distribution : adopt
7723 cache : sbt
78-
79- - name : sbt update
80- if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
81- run : sbt +update
82-
83- - name : Check that workflows are up to date
84- run : sbt githubWorkflowCheck
85-
86- - uses : coursier/setup-action@v1
87- with :
88- apps : scalafmt
89-
90- - name : Build project
91- run : sbt '++ ${{ matrix.scala }}' validate
92-
93- - name : Codecov
94- uses : codecov/codecov-action@v3
95-
96- - name : Make target directories
97- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
98- run : mkdir -p target modules/docs/.jvm/target modules/dummy/.jvm/target modules/core/.jvm/target modules/benchmark/.jvm/target project/target
99-
100- - name : Compress target directories
101- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
102- run : tar cf targets.tar target modules/docs/.jvm/target modules/dummy/.jvm/target modules/core/.jvm/target modules/benchmark/.jvm/target project/target
103-
104- - name : Upload target directories
105- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
106- uses : actions/upload-artifact@v4
107- with :
108- name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
109- path : targets.tar
110-
111- publish :
112- name : Publish Artifacts
113- needs : [build]
114- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
115- strategy :
116- matrix :
117- os : [ubuntu-latest]
118- java : [temurin@21]
119- runs-on : ${{ matrix.os }}
120- steps :
121- - name : Install sbt
122- uses : sbt/setup-sbt@v1
123-
124- - name : Checkout current branch (full)
125- uses : actions/checkout@v4
126- with :
127- fetch-depth : 0
128-
129- - name : Setup Java (temurin@21)
130- id : setup-java-temurin-21
131- if : matrix.java == 'temurin@21'
132- uses : actions/setup-java@v4
133- with :
134- distribution : temurin
135- java-version : 21
136- cache : sbt
137-
138- - name : sbt update
139- if : matrix.java == 'temurin@21' && steps.setup-java-temurin-21.outputs.cache-hit == 'false'
140- run : sbt +update
141-
142- - name : Setup Java (temurin@17)
143- id : setup-java-temurin-17
144- if : matrix.java == 'temurin@17'
145- uses : actions/setup-java@v4
146- with :
147- distribution : temurin
148- java-version : 17
149- cache : sbt
150-
151- - name : sbt update
152- if : matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
153- run : sbt +update
154-
155- - name : Setup Java (temurin@11)
156- id : setup-java-temurin-11
157- if : matrix.java == 'temurin@11'
158- uses : actions/setup-java@v4
159- with :
160- distribution : temurin
161- java-version : 11
162- cache : sbt
163-
164- - name : sbt update
165- if : matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
166- run : sbt +update
167-
168- - name : Download target directories (2.13)
169- uses : actions/download-artifact@v4
170- with :
171- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13
172-
173- - name : Inflate target directories (2.13)
174- run : |
175- tar xf targets.tar
176- rm targets.tar
177-
178- - name : Publish JARs
179- env :
180- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
181- PGP_SECRET : ${{ secrets.PGP_SECRET }}
182- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
183- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
184- run : sbt ci-release
185-
186- - name : Publish Docker image
187- run : |
188- docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
189- sbt core/Docker/publish
24+ - run : echo "${{ secrets.APP_PRIVATE_KEY }}" > key.pem
25+ - uses : coursier/coursier-setup@v1
26+ - run : cs install scalafmt
27+ - run : cs install scalafix
28+ - uses : sbt/setup-sbt@v1
29+ - run : GITHUB_TOKEN=${{ secrets.MY_GITHUB_TOKEN }} sbt -v runSteward || true
0 commit comments