1
+ name : Build macos
2
+
3
+ on :
4
+ push :
5
+ # branches: [ "main" ]
6
+ pull_request :
7
+ branches : ["main"]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : macos-11
12
+
13
+ strategy :
14
+ matrix :
15
+ arch : [arm64, x86_64]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ with :
20
+ submodules : true
21
+
22
+ - name : Install Qt
23
+ uses : jurplel/install-qt-action@v3
24
+ with :
25
+ version : 6.5.3
26
+ tools : ' tools_ifw tools_cmake'
27
+ modules : ' qtwebsockets qt5compat'
28
+
29
+ - name : Run build
30
+ run : |
31
+ ./tools/build-macos.sh ${{ matrix.arch }}
32
+ env :
33
+ CI : 1
34
+ BUILD_QT_PATH : ${{ github.workspace }}/Qt/6.5.3/macos
35
+ BUILD_PARALLEL_THREADS : 2
36
+
37
+ - name : Rename build
38
+ id : " rename-build"
39
+ shell : bash
40
+ run : |
41
+ TARGET=casparcg-client-${{ github.sha }}-${{ matrix.arch }}.dmg
42
+ mv build/CasparCG*.dmg "$TARGET"
43
+
44
+ echo "artifactname=$TARGET" >> $GITHUB_OUTPUT
45
+
46
+ # check if a release branch, or main, or a tag
47
+ if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "2.3.x-lts" ]]
48
+ then
49
+ # Only report if we have an sftp password
50
+ if [ -n "${{ secrets.SFTP_PASSWORD }}" ]
51
+ then
52
+ echo "uploadname=$TARGET" >> $GITHUB_OUTPUT
53
+ fi
54
+ fi
55
+
56
+ - uses : actions/upload-artifact@v3
57
+ with :
58
+ name : casparcg-client-macos-${{ matrix.arch }}
59
+ path : ${{ steps.rename-build.outputs.artifactname }}
60
+
61
+ - name : Copy single file to remote
62
+ uses : garygrossgarten/github-action-scp@v0.8.0
63
+ if : ${{ steps.rename-build.outputs.uploadname }}
64
+ with :
65
+ local : " ${{ steps.rename-build.outputs.uploadname }}"
66
+ remote : " ${{ secrets.SFTP_ROOT }}/${{ github.ref_name }}/${{ steps.rename-build.outputs.uploadname }}"
67
+ host : ${{ secrets.SFTP_HOST }}
68
+ username : ${{ secrets.SFTP_USERNAME }}
69
+ password : ${{ secrets.SFTP_PASSWORD }}
0 commit comments