ci: don't build on PRs (#370)

This commit is contained in:
Kilian von Pflugk 2024-11-05 13:11:27 +00:00 committed by GitHub
parent da935524bd
commit b9194334c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 32 deletions

View File

@ -3,16 +3,7 @@ name: "Build Plugin"
on: on:
push: push:
branches: branches:
- '*' - '*' # Triggers on any branch push
paths-ignore:
- "**/README.md"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
- "images/**"
- "manifest.json"
pull_request:
branches:
- '*'
paths-ignore: paths-ignore:
- "**/README.md" - "**/README.md"
- ".github/ISSUE_TEMPLATE/**" - ".github/ISSUE_TEMPLATE/**"
@ -99,27 +90,17 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v4.3.6 uses: actions/upload-artifact@v4.3.6
if: github.event_name != 'pull_request'
with: with:
name: IntroSkipper-${{ env.GIT_HASH }}.dll name: IntroSkipper-${{ env.GIT_HASH }}.dll
path: IntroSkipper/bin/Debug/net8.0/IntroSkipper.dll path: IntroSkipper/bin/Debug/net8.0/IntroSkipper.dll
if-no-files-found: error 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 - 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 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 - 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: | run: |
gh release delete "${{ env.MAIN_VERSION }}/preview" --cleanup-tag --yes || true 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 }} 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 }}

View File

@ -3,16 +3,7 @@ name: "CodeQL"
on: on:
push: push:
branches: branches:
- '*' - '*' # Triggers on any branch push
paths-ignore:
- "**/README.md"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
- "images/**"
- "manifest.json"
pull_request:
branches:
- '*'
paths-ignore: paths-ignore:
- "**/README.md" - "**/README.md"
- ".github/ISSUE_TEMPLATE/**" - ".github/ISSUE_TEMPLATE/**"