@@ -211,6 +211,7 @@ jobs:
211211 then
212212 echo "This is a PUSH event"
213213 branch=${{ github.ref_name }}
214+ build_version=${{ needs.check_changelog.outputs.next_version }}
214215 commit=${{ github.sha }}
215216 clone_url=${{ github.event.repository.clone_url }}
216217 else
@@ -227,6 +228,7 @@ jobs:
227228
228229 cd build
229230 cmake -DGITHUB_CLONE_URL=${clone_url} \
231+ -DBUILD_VERSION=${build_version} \
230232 -DGITHUB_BRANCH=${branch} \
231233 -DGITHUB_COMMIT=${commit} \
232234 -DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \
@@ -377,7 +379,7 @@ jobs:
377379 - name : Build Linux
378380 env :
379381 BRANCH : ${{ github.head_ref || github.ref_name }}
380- BUILD_VERSION : ${{ needs.check_changelog.outputs.next_version_bare }}
382+ BUILD_VERSION : ${{ needs.check_changelog.outputs.next_version }}
381383 COMMIT : ${{ github.event.pull_request.head.sha || github.sha }}
382384 timeout-minutes : 5
383385 run : |
@@ -500,18 +502,24 @@ jobs:
500502 run : |
501503 ${{ steps.python.outputs.python-path }} -m pip install gcovr
502504 ${{ steps.python.outputs.python-path }} -m gcovr -r .. \
503- --exclude ../ tests/ \
504- --exclude ../third-party/ \
505+ --exclude '.* tests/.*' \
506+ --exclude '.*tests/.*' \
505507 --xml-pretty \
506508 -o coverage.xml
507509
508510 - name : Upload coverage
509511 # any except canceled or skipped
510- if : always() && (steps.test_report.outcome == 'success')
511- uses : codecov/codecov-action@v3
512+ if : >-
513+ always() &&
514+ (steps.test_report.outcome == 'success') &&
515+ startsWith(github.repository, 'LizardByte/')
516+ uses : codecov/codecov-action@v4
512517 with :
518+ disable_search : true
519+ fail_ci_if_error : true
513520 files : ./build/coverage.xml
514521 flags : ${{ runner.os }}
522+ token : ${{ secrets.CODECOV_TOKEN }}
515523
516524 - name : Create/Update GitHub Release
517525 if : ${{ needs.setup_release.outputs.create_release == 'true' }}
@@ -560,13 +568,16 @@ jobs:
560568 if [ -z "$branch" ]
561569 then
562570 echo "This is a PUSH event"
571+ build_version=${{ needs.check_changelog.outputs.next_version }}
563572 clone_url=${{ github.event.repository.clone_url }}
564573 branch="${{ github.ref_name }}"
574+ commit=${{ github.sha }}
565575 default_branch="${{ github.event.repository.default_branch }}"
566576 else
567577 echo "This is a PR event"
568578 clone_url=${{ github.event.pull_request.head.repo.clone_url }}
569579 branch="${{ github.event.pull_request.head.ref }}"
580+ commit=${{ github.event.pull_request.head.sha }}
570581 default_branch="${{ github.event.pull_request.head.repo.default_branch }}"
571582 fi
572583 echo "Branch: ${branch}"
@@ -575,7 +586,9 @@ jobs:
575586 mkdir build
576587 cd build
577588 cmake \
589+ -DBUILD_VERSION="${build_version}" \
578590 -DGITHUB_BRANCH="${branch}" \
591+ -DGITHUB_COMMIT="${commit}" \
579592 -DGITHUB_CLONE_URL="${clone_url}" \
580593 -DGITHUB_DEFAULT_BRANCH="${default_branch}" \
581594 -DSUNSHINE_CONFIGURE_HOMEBREW=ON \
@@ -613,7 +626,7 @@ jobs:
613626 echo "publish=${PUBLISH}" >> $GITHUB_OUTPUT
614627
615628 - name : Validate and Publish Homebrew Formula
616- uses : LizardByte/homebrew-release-action@v2024.314.134529
629+ uses : LizardByte/homebrew-release-action@v2024.417.220943
617630 with :
618631 formula_file : ${{ github.workspace }}/homebrew/sunshine.rb
619632 git_email : ${{ secrets.GH_BOT_EMAIL }}
@@ -673,6 +686,8 @@ jobs:
673686 if [ -z "$branch" ]
674687 then
675688 echo "This is a PUSH event"
689+ branch="${{ github.ref_name }}"
690+ build_version=${{ needs.check_changelog.outputs.next_version }}
676691 commit=${{ github.sha }}
677692 clone_url=${{ github.event.repository.clone_url }}
678693 else
@@ -686,6 +701,8 @@ jobs:
686701 mkdir build
687702 cd build
688703 cmake \
704+ -DBUILD_VERSION=${build_version} \
705+ -DGITHUB_BRANCH=${branch} \
689706 -DGITHUB_COMMIT=${commit} \
690707 -DGITHUB_CLONE_URL=${clone_url} \
691708 -DSUNSHINE_CONFIGURE_PORTFILE=ON \
@@ -821,20 +838,26 @@ jobs:
821838 cd ${build_dir}
822839 ${{ steps.python.outputs.python-path }} -m pip install gcovr
823840 sudo ${{ steps.python.outputs.python-path }} -m gcovr -r ../${dir} \
824- --exclude ../ ${dir}/tests/ \
825- --exclude ../ ${dir}/third-party/ \
841+ --exclude '.* ${dir}/tests/.*' \
842+ --exclude '.* ${dir}/third-party/.*' \
826843 --gcov-object-directory $(pwd) \
827844 --verbose \
828845 --xml-pretty \
829846 -o ${{ github.workspace }}/build/coverage.xml
830847
831848 - name : Upload coverage
832849 # any except canceled or skipped
833- if : always() && (steps.test_report.outcome == 'success')
834- uses : codecov/codecov-action@v3
850+ if : >-
851+ always() &&
852+ (steps.test_report.outcome == 'success') &&
853+ startsWith(github.repository, 'LizardByte/')
854+ uses : codecov/codecov-action@v4
835855 with :
856+ disable_search : true
857+ fail_ci_if_error : false # todo: re-enable this when action is fixed
836858 files : ./build/coverage.xml
837859 flags : ${{ runner.os }}-${{ matrix.os_version }}
860+ token : ${{ secrets.CODECOV_TOKEN }}
838861
839862 - name : Create/Update GitHub Release
840863 if : ${{ needs.setup_release.outputs.create_release == 'true' && matrix.release }}
@@ -1014,7 +1037,7 @@ jobs:
10141037 shell : msys2 {0}
10151038 env :
10161039 BRANCH : ${{ github.head_ref || github.ref_name }}
1017- BUILD_VERSION : ${{ needs.check_changelog.outputs.next_version_bare }}
1040+ BUILD_VERSION : ${{ needs.check_changelog.outputs.next_version }}
10181041 COMMIT : ${{ github.event.pull_request.head.sha || github.sha }}
10191042 run : |
10201043 mkdir build
@@ -1059,18 +1082,24 @@ jobs:
10591082 run : |
10601083 ${{ steps.python-path.outputs.python-path }} -m pip install gcovr
10611084 ${{ steps.python-path.outputs.python-path }} -m gcovr -r .. \
1062- --exclude ../ tests/ \
1063- --exclude ../third-party/ \
1085+ --exclude '.* tests/.*' \
1086+ --exclude '.*tests/.*' \
10641087 --xml-pretty \
10651088 -o coverage.xml
10661089
10671090 - name : Upload coverage
10681091 # any except canceled or skipped
1069- if : always() && (steps.test_report.outcome == 'success')
1070- uses : codecov/codecov-action@v3
1092+ if : >-
1093+ always() &&
1094+ (steps.test_report.outcome == 'success') &&
1095+ startsWith(github.repository, 'LizardByte/')
1096+ uses : codecov/codecov-action@v4
10711097 with :
1098+ disable_search : true
1099+ fail_ci_if_error : true
10721100 files : ./build/coverage.xml
10731101 flags : ${{ runner.os }}
1102+ token : ${{ secrets.CODECOV_TOKEN }}
10741103
10751104 - name : Package Windows Debug Info
10761105 working-directory : build
0 commit comments