dev: 尝试修正工作流

This commit is contained in:
MKStoler 2024-12-17 22:43:06 +00:00
parent 12a33929cd
commit dae6a52745
3 changed files with 52 additions and 8 deletions

26
.github/workflows/inactive.yaml vendored Normal file
View File

@ -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 }}

View File

@ -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

21
.github/workflows/similarity.yaml vendored Normal file
View File

@ -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