Skip to content

Commit d12d4cc

Browse files
committed
update ci plugin
1 parent 3f0b637 commit d12d4cc

File tree

4 files changed

+17
-39
lines changed

4 files changed

+17
-39
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,64 +12,46 @@ on:
1212
branches: ['**']
1313
push:
1414
branches: ['**']
15-
tags: [v*]
1615

1716
env:
1817
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1918

20-
21-
concurrency:
22-
group: ${{ github.workflow }} @ ${{ github.ref }}
23-
cancel-in-progress: true
24-
2519
jobs:
2620
build:
2721
name: Build and Test
2822
strategy:
2923
matrix:
3024
os: [ubuntu-latest]
31-
scala: [2.12, 2.13, 3]
25+
scala: [2.12.18, 2.13.12, 3.3.1]
3226
java: [zulu@8]
3327
runs-on: ${{ matrix.os }}
34-
timeout-minutes: 60
3528
steps:
3629
- name: Checkout current branch (full)
3730
uses: actions/checkout@v4
3831
with:
3932
fetch-depth: 0
4033

4134
- name: Setup Java (zulu@8)
42-
id: setup-java-zulu-8
4335
if: matrix.java == 'zulu@8'
4436
uses: actions/setup-java@v3
4537
with:
4638
distribution: zulu
4739
java-version: 8
4840
cache: sbt
4941

50-
- name: sbt update
51-
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
52-
run: sbt +update
53-
5442
- name: Check that workflows are up to date
55-
run: sbt githubWorkflowCheck
43+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
5644

5745
- name: Build project
5846
run: sbt '++ ${{ matrix.scala }}' test
5947

60-
- name: Make target directories
61-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
62-
run: mkdir -p target project/target
63-
6448
- name: Compress target directories
65-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
6649
run: tar cf targets.tar target project/target
6750

6851
- name: Upload target directories
69-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
7052
uses: actions/upload-artifact@v3
7153
with:
72-
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
54+
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
7355
path: targets.tar
7456

7557
publish:
@@ -79,6 +61,7 @@ jobs:
7961
strategy:
8062
matrix:
8163
os: [ubuntu-latest]
64+
scala: [2.13.12]
8265
java: [zulu@8]
8366
runs-on: ${{ matrix.os }}
8467
steps:
@@ -88,44 +71,39 @@ jobs:
8871
fetch-depth: 0
8972

9073
- name: Setup Java (zulu@8)
91-
id: setup-java-zulu-8
9274
if: matrix.java == 'zulu@8'
9375
uses: actions/setup-java@v3
9476
with:
9577
distribution: zulu
9678
java-version: 8
9779
cache: sbt
9880

99-
- name: sbt update
100-
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
101-
run: sbt +update
102-
103-
- name: Download target directories (2.12)
81+
- name: Download target directories (2.12.18)
10482
uses: actions/download-artifact@v3
10583
with:
106-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12
84+
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
10785

108-
- name: Inflate target directories (2.12)
86+
- name: Inflate target directories (2.12.18)
10987
run: |
11088
tar xf targets.tar
11189
rm targets.tar
11290
113-
- name: Download target directories (2.13)
91+
- name: Download target directories (2.13.12)
11492
uses: actions/download-artifact@v3
11593
with:
116-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
94+
name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }}
11795

118-
- name: Inflate target directories (2.13)
96+
- name: Inflate target directories (2.13.12)
11997
run: |
12098
tar xf targets.tar
12199
rm targets.tar
122100
123-
- name: Download target directories (3)
101+
- name: Download target directories (3.3.1)
124102
uses: actions/download-artifact@v3
125103
with:
126-
name: target-${{ matrix.os }}-${{ matrix.java }}-3
104+
name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }}
127105

128-
- name: Inflate target directories (3)
106+
- name: Inflate target directories (3.3.1)
129107
run: |
130108
tar xf targets.tar
131109
rm targets.tar

.github/workflows/clean.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20+
shell: bash {0}
2021
run: |
2122
# Customize those three lines with your repository and credentials:
2223
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -25,7 +26,7 @@ jobs:
2526
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2627
2728
# A temporary file which receives HTTP response headers.
28-
TMPFILE=/tmp/tmp.$$
29+
TMPFILE=$(mktemp)
2930
3031
# An associative array, key: artifact name, value: number of artifacts of that name.
3132
declare -A ARTCOUNT

build.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import xml.Group
33
import sbt._
44
import Keys._
5-
import org.typelevel.sbt.gha.JavaSpec.Distribution.Zulu
5+
import sbtghactions.JavaSpec.Distribution.Zulu
66

77
organization := "com.github.swagger-akka-http"
88

@@ -57,7 +57,6 @@ pomExtra := {
5757

5858
MetaInfLicenseCopy.settings
5959

60-
ThisBuild / tlSonatypeUseLegacyHost := true
6160
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Zulu, "8"))
6261
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
6362
RefPredicate.Equals(Ref.Branch("main")),

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
22

33
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
44

5-
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.4")
5+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0")
66

77
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

0 commit comments

Comments
 (0)