From b9194334c67650faa7f7b98dd8872bb8c9c5042a Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Tue, 5 Nov 2024 13:11:27 +0000 Subject: [PATCH] ci: don't build on PRs (#370) --- .github/workflows/build.yml | 25 +++---------------------- .github/workflows/codeql.yml | 11 +---------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cb48ad..bff9fdb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,16 +3,7 @@ name: "Build Plugin" on: push: branches: - - '*' - paths-ignore: - - "**/README.md" - - ".github/ISSUE_TEMPLATE/**" - - "docs/**" - - "images/**" - - "manifest.json" - pull_request: - branches: - - '*' + - '*' # Triggers on any branch push paths-ignore: - "**/README.md" - ".github/ISSUE_TEMPLATE/**" @@ -99,27 +90,17 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4.3.6 - if: github.event_name != 'pull_request' with: name: IntroSkipper-${{ env.GIT_HASH }}.dll path: IntroSkipper/bin/Debug/net8.0/IntroSkipper.dll if-no-files-found: error - - name: Upload artifact - uses: actions/upload-artifact@v4.3.6 - if: github.event_name == 'pull_request' - with: - name: IntroSkipper-${{ env.SANITIZED_BRANCH_NAME }}.dll - path: IntroSkipper/bin/Debug/net8.0/IntroSkipper.dll - retention-days: 3 - if-no-files-found: error - - name: Create archive - if: github.event_name != 'pull_request' + if: startsWith(github.ref_name, '10.') # only do a preview release on 10.x branches run: zip -j "intro-skipper-${{ env.GIT_HASH }}.zip" IntroSkipper/bin/Debug/net8.0/IntroSkipper.dll - name: Create/replace the preview release and upload artifacts - if: github.event_name != 'pull_request' + if: startsWith(github.ref_name, '10.') # only do a preview release on 10.x branches run: | gh release delete "${{ env.MAIN_VERSION }}/preview" --cleanup-tag --yes || true gh release create "${{ env.MAIN_VERSION }}/preview" "intro-skipper-${{ env.GIT_HASH }}.zip" --prerelease --title "intro-skipper-${{ env.GIT_HASH }}" --notes "This is a prerelease version." --target ${{ env.MAIN_VERSION }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0b30a48..36a2e9f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,16 +3,7 @@ name: "CodeQL" on: push: branches: - - '*' - paths-ignore: - - "**/README.md" - - ".github/ISSUE_TEMPLATE/**" - - "docs/**" - - "images/**" - - "manifest.json" - pull_request: - branches: - - '*' + - '*' # Triggers on any branch push paths-ignore: - "**/README.md" - ".github/ISSUE_TEMPLATE/**"