@@ -17,18 +17,28 @@ runs:
17
17
with :
18
18
repository : " Adyen/adyen-swift-public-api-diff"
19
19
# ref: "0.7.0"
20
- - name : Compute binary path
20
+
21
+ - name : 👾 Compute binary path
21
22
id : compute-path
22
23
run : echo "BINARY_PATH=$(swift build --configuration release --show-bin-path)/public-api-diff" >> $GITHUB_ENV
23
24
shell : bash
24
-
25
- - name : Cache Swift Build
26
- uses : actions/cache@v3
25
+
26
+ - name : 🛻 Restore Binary
27
+ uses : actions/cache/restore@v3
28
+ with :
29
+ path : ${{ env.BINARY_PATH }}
30
+ key : build-cache-${{ runner.os }}-ENTER_VERSION_NUMBER_HERE
31
+
32
+ - name : 🧰 Build Swift CLI
33
+ run : swift build --configuration release
34
+
35
+ - name : 💾 Save Binary
36
+ uses : actions/cache/save@v3
27
37
with :
28
38
path : ${{ env.BINARY_PATH }}
29
- key : ${{ runner.os }}-swift-build-6ec5ba25648323a388a756636e7f668b04d9f615
30
- # key: ${{ runner.os }}-swift-build-${{ github.sha }}
31
- - name : " Run Diff"
39
+ key : build-cache- ${{ runner.os }}-ENTER_VERSION_NUMBER_HERE
40
+
41
+ - name : 🏃 Run Diff
32
42
run : |
33
43
NEW=${{ inputs.new }}
34
44
OLD=${{ inputs.old }}
40
50
41
51
# Check if the binary exists
42
52
if [ ! -f $BINARY_PATH ]; then
43
-
44
- echo "📭 Binary not found at $BINARY_PATH. Building the project..."
45
- swift build --configuration release
46
-
47
- # Check if the build was successful
48
- if [ ! -f "$BINARY_PATH" ]; then
49
- echo "Build failed"
50
- exit 1
51
- fi
53
+ echo "📭 Binary not found at $BINARY_PATH. Exiting..."
52
54
else
53
55
echo "📬 Binary found at $BINARY_PATH"
54
56
fi
0 commit comments