From 664bdfb87421056f500b4692132283ba076da7ba Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Wed, 22 May 2024 14:53:35 +0300 Subject: [PATCH 1/4] Make nightly releases --- .github/workflows/main.yml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0247ac5..58f0d356 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,23 +21,13 @@ jobs: with: submodules: "recursive" - name: CI Bootstrap - run: | - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 + run: src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 - name: Lilu Bootstrap - run: | - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - + run: src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - run: xcodebuild -configuration Debug - run: xcodebuild -configuration Release - - - name: Upload to Artifacts - uses: actions/upload-artifact@v4 - with: - name: Artifacts - path: build/*/*.zip - - name: Upload to Release - if: github.event_name == 'release' - uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd + - name: Upload build + uses: svenstaro/upload-release-action@2.9.0 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: build/*/*.zip @@ -54,11 +44,8 @@ jobs: with: submodules: "recursive" - name: CI Bootstrap - run: | - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 + run: src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1 - name: Lilu Bootstrap - run: | - src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - + run: src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/bootstrap.sh) && eval "$src" || exit 1 - run: xcodebuild analyze -quiet -scheme NootedRed -configuration Debug CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] - run: xcodebuild analyze -quiet -scheme NootedRed -configuration Release CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang-analyze" && [ "$(find clang-analyze -name "*.html")" = "" ] From 88a39b67003cd699549094a0dabc34d75b900497 Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Wed, 22 May 2024 15:01:11 +0300 Subject: [PATCH 2/4] Mark prerelease if event is not release publish --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58f0d356..a1bb69ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,7 @@ jobs: file: build/*/*.zip tag: ${{ github.ref }} file_glob: true + prerelease: github.event_name != 'release' analyse-clang: name: Analyse Clang From 2c507a33e83e3dacd65e4b926c9432b81851b45b Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Wed, 22 May 2024 15:07:16 +0300 Subject: [PATCH 3/4] Allow asset overwrite and set tag to nightly --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1bb69ee..18b57bb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,10 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: build/*/*.zip - tag: ${{ github.ref }} + tag: ${{ github.event_name == 'release' && github.ref || 'nightly' }} file_glob: true - prerelease: github.event_name != 'release' + prerelease: ${{ github.event_name != 'release' }} + overwrite: true analyse-clang: name: Analyse Clang From 37feef956cbeb2053e07a2cdc22b47916b6f7731 Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Wed, 22 May 2024 15:09:22 +0300 Subject: [PATCH 4/4] Disallow uploading build on PR --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18b57bb8..6c6c23a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,7 @@ jobs: - run: xcodebuild -configuration Release - name: Upload build uses: svenstaro/upload-release-action@2.9.0 + if: github.event_name != 'pull_request' with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: build/*/*.zip