99 pull_request :
1010 branches : [ master ]
1111
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.ref }}
14+ cancel-in-progress : true
15+
16+ permissions :
17+ contents : write
18+ pull-requests : write
19+
1220# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1321jobs :
1422 Windows :
@@ -24,13 +32,12 @@ jobs:
2432 steps :
2533 - name : " Set Build Type"
2634 id : build_type
35+ shell : pwsh
2736 run : |
2837 if ("${{ github.ref }}".StartsWith("refs/tags/")) {
29- echo "BUILD_TYPE::Release";
30- echo "::set-output name=BUILD_TYPE::Release";
38+ echo "BUILD_TYPE=Release" >> $env:GITHUB_OUTPUT
3139 } else {
32- echo "BUILD_TYPE::Debug";
33- echo "::set-output name=BUILD_TYPE::Debug";
40+ echo "BUILD_TYPE=Debug" >> $env:GITHUB_OUTPUT
3441 }
3542
3643 if ("${{ matrix.arch }}" -eq "x64") {
5057 # uses: ammaraskar/msvc-problem-matcher@master
5158
5259 # Install latest CMake
53- - uses : lukka/get-cmake@latest
60+ - uses : lukka/get-cmake@v3.31.6
5461
5562 # Restore from cache the previously built ports
5663 - name : Restore artifacts, or setup vcpkg
6673
6774 - name : ' Run CMake'
6875 uses : lukka/run-cmake@v10
76+ continue-on-error : false
6977 with :
7078 configurePreset : ' windows-msvc-vs17'
7179 buildPreset : ${{ startsWith(github.ref, 'refs/tags/') && 'windows-msvc-vs17-release' || 'windows-msvc-vs17' }}
@@ -108,23 +116,21 @@ jobs:
108116 working-directory : " ${{ github.workspace }}/../../_temp/windows/"
109117 - name : Release
110118 if : startsWith(github.ref, 'refs/tags/')
111- uses : softprops/action-gh-release@v1
119+ uses : softprops/action-gh-release@v2
112120 with :
113121 draft : true
114- files : " D:/a/_temp/windows/libsimple-windows-${{ matrix.arch }}.zip"
115- # files: "${{ github.workspace }}/../../_temp/windows/libsimple-windows-${{ matrix.arch }}.zip"
122+ files : " ${{ github.workspace }}/../../_temp/windows/libsimple-windows-${{ matrix.arch }}.zip"
116123 env :
117124 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
125+ BUILD_TYPE : ${{ github.ref_type == 'tag' && 'Release' || 'Debug' }}
118126
119127 Linux :
120128 runs-on : ${{ matrix.os }}
121129 strategy :
122130 fail-fast : true
123131 matrix :
124- include :
125- - os : ubuntu-20.04
126- - os : ubuntu-22.04-arm
127- - os : ubuntu-latest
132+ os : [ubuntu-20.04, ubuntu-22.04-arm, ubuntu-latest]
133+ timeout-minutes : 60
128134 steps :
129135 - name : " Release Build Type"
130136 if : startsWith(github.ref, 'refs/tags/')
@@ -167,7 +173,7 @@ jobs:
167173
168174 - name : ' Run CMake'
169175 uses : lukka/run-cmake@v10
170- if : startsWith(github.ref, 'refs/tags/') != true
176+ continue-on-error : false
171177 with :
172178 configurePreset : ' ninja-vcpkg-coverage'
173179 buildPreset : ' ninja-vcpkg-coverage'
@@ -243,7 +249,7 @@ jobs:
243249 working-directory : " ${{ github.workspace }}/build"
244250 - name : Release without changelog
245251 if : ${{ startsWith(github.ref, 'refs/tags/') && matrix.os != 'ubuntu-latest' }}
246- uses : softprops/action-gh-release@v1
252+ uses : softprops/action-gh-release@v2
247253 with :
248254 draft : true
249255 files : ${{ github.workspace }}/build/libsimple-linux-${{ matrix.os }}.zip
@@ -259,6 +265,13 @@ jobs:
259265 env :
260266 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
261267
268+ - name : Build Summary
269+ if : always()
270+ run : |
271+ echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
272+ echo "- Build Type: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY
273+ echo "- OS: ${{ runner.os }}" >> $GITHUB_STEP_SUMMARY
274+
262275 MacOS :
263276 runs-on : macos-latest
264277 needs : Linux
@@ -348,4 +361,5 @@ jobs:
348361 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
349362
350363 - name : build-iOS
364+ if : success()
351365 run : ./build-ios.sh
0 commit comments