mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-17 18:40:33 +00:00
60d1a59bd3
- Deletes runs more than 15 days old - Retains last 5 runs of each workflow, regardless of age
63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
name: Main
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- 'Packages/**'
|
|
- 'ProjectSettings/**'
|
|
- '.github/**'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.editorconfig'
|
|
- 'LICENSE'
|
|
- '**.md'
|
|
- '**.yml'
|
|
- '**.txt'
|
|
- '**.ps1'
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- 'Packages/**'
|
|
- 'ProjectSettings/**'
|
|
- '.github/**'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.editorconfig'
|
|
- 'LICENSE'
|
|
- '**.md'
|
|
- '**.yml'
|
|
- '**.txt'
|
|
- '**.ps1'
|
|
|
|
jobs:
|
|
RunUnityTests:
|
|
name: Run Unity Tests
|
|
uses: ./.github/workflows/RunUnityTests.yml
|
|
secrets: inherit
|
|
|
|
#SonarQube:
|
|
# name: SonarQube Analysis
|
|
# needs: RunUnityTests
|
|
# uses: ./.github/workflows/SonarQube.yml
|
|
# secrets: inherit
|
|
|
|
Release:
|
|
name: Semantic Release
|
|
if: github.event_name == 'push'
|
|
needs: RunUnityTests
|
|
uses: ./.github/workflows/Semantic.yml
|
|
secrets: inherit
|
|
|
|
DeleteOldWorkflowRuns:
|
|
name: Delete Old Workflow Runs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Delete workflow runs
|
|
uses: Mattraks/delete-workflow-runs@v2
|
|
with:
|
|
retain_days: 15 # Delete runs older than 15 days
|
|
keep_minimum_runs: 5 # Keep the last 5 runs |