From dae6a527459c7eefb0e5933ee3011f4895bc84df Mon Sep 17 00:00:00 2001 From: MKStoler Date: Tue, 17 Dec 2024 22:43:06 +0000 Subject: [PATCH] =?UTF-8?q?dev:=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/inactive.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/prbuild.yaml | 13 +++++-------- .github/workflows/similarity.yaml | 21 +++++++++++++++++++++ 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/inactive.yaml create mode 100644 .github/workflows/similarity.yaml diff --git a/.github/workflows/inactive.yaml b/.github/workflows/inactive.yaml new file mode 100644 index 0000000..b3f77fe --- /dev/null +++ b/.github/workflows/inactive.yaml @@ -0,0 +1,26 @@ +name: Close inactive issues +on: + workflow_dispatch: + + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + any-of-labels: 进一步提供信息, 不正确 + days-before-issue-stale: 14 + days-before-issue-close: 7 + days-before-pr-stale: 14 + days-before-pr-close: 7 + stale-issue-label: "陈旧" + stale-pr-label: "陈旧" + stale-issue-message: "由于此 Issue 在 14 天内没有动态,已被标记为陈旧。如果此 Issue 没有更多动态(评论等),将在 7 天后被关闭。" + stale-pr-message: "由于此 Pull Request 在 14 天内没有动态,已被标记为陈旧。如果此 Pull Request 没有更多动态(评论等),将在 7 天后被关闭。" + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/prbuild.yaml b/.github/workflows/prbuild.yaml index 22c3a1d..a8df92d 100644 --- a/.github/workflows/prbuild.yaml +++ b/.github/workflows/prbuild.yaml @@ -17,28 +17,25 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.1.7 - if: github.event.release.prerelease == false || matrix.os == 'windows-latest' - name: Set up Node.js uses: actions/setup-node@v4 - if: github.event.release.prerelease == false || matrix.os == 'windows-latest' with: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install - if: github.event.release.prerelease == false || matrix.os == 'windows-latest' - name: Build and package for Windows - if: github.event.release.prerelease == false && matrix.os == 'windows-latest' + if: matrix.os == 'windows-latest' run: yarn build:win - name: Build and package for macOS - if: github.event.release.prerelease == true && matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' run: yarn build:mac - name: Build and package for Linux - if: github.event.release.prerelease == true && matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' run: yarn build:linux - name: Upload artifact for Windows @@ -49,14 +46,14 @@ jobs: path: dist/*.exe - name: Upload artifact for macOS - if: github.event.release.prerelease == true && matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' uses: actions/upload-artifact@v4 with: name: ExamShowboard-macOS path: dist/*.dmg - name: Upload artifact for Linux - if: github.event.release.prerelease == true && matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: ExamShowboard-Linux diff --git a/.github/workflows/similarity.yaml b/.github/workflows/similarity.yaml new file mode 100644 index 0000000..f6eb6cc --- /dev/null +++ b/.github/workflows/similarity.yaml @@ -0,0 +1,21 @@ +name: Issues Similarity Analysis + +on: + issues: + types: [opened, edited] + +jobs: + similarity-analysis: + runs-on: ubuntu-latest + steps: + - name: analysis + uses: actions-cool/issues-similarity-analysis@v1 + with: + filter-threshold: 0.5 + comment-title: | + ### 相似 Issues + comment-body: '${index}. ${similarity} #${number}' + title-excludes: "(在这里输入你的标题),bug" + since-days: 365 + show-footer: false + show-mentioned: true \ No newline at end of file