diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 48051ed..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Auto Release & Publish - -on: - push: - branches: [master] - paths-ignore: - - '**.md' - - '.gitignore' - - 'LICENSE' - workflow_dispatch: - inputs: - version: - description: "Version override (leave empty to use pom.xml)" - required: false - -jobs: - release-and-publish: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 (v4.3.1) - with: - fetch-depth: 0 - - - name: Set up JDK - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 (v4.8.0) - with: - java-version: '21' - distribution: 'temurin' - cache: maven - - - name: Extract version - id: version - run: | - if [ -n "${{ github.event.inputs.version }}" ]; then - echo "VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" - else - VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" - fi - - - name: Check if release exists - id: check - env: - GH_TOKEN: ${{ github.token }} - run: | - if gh release view "v${{ steps.version.outputs.VERSION }}" > /dev/null 2>&1; then - echo "EXISTS=true" >> "$GITHUB_OUTPUT" - echo "::notice::Release v${{ steps.version.outputs.VERSION }} already exists, skipping." - else - echo "EXISTS=false" >> "$GITHUB_OUTPUT" - fi - - - name: Generate changelog - if: steps.check.outputs.EXISTS == 'false' - run: | - PREV_TAG=$(git tag --sort=-v:refname | head -1) - { - echo "## 更新日志 / Changelog" - echo "" - if [ -z "$PREV_TAG" ]; then - git log --pretty=format:"- %s" - else - git log --pretty=format:"- %s" "${PREV_TAG}..HEAD" - fi - echo "" - } > /tmp/changelog.md - - - name: Set project version - if: steps.check.outputs.EXISTS == 'false' - run: mvn versions:set -DnewVersion="${{ steps.version.outputs.VERSION }}" -DgenerateBackupPoms=false - - - name: Build - if: steps.check.outputs.EXISTS == 'false' - run: mvn clean package -Dmaven.test.skip=true - - - name: Create GitHub Release - if: steps.check.outputs.EXISTS == 'false' - env: - GH_TOKEN: ${{ github.token }} - run: | - gh release create "v${{ steps.version.outputs.VERSION }}" \ - --title "v${{ steps.version.outputs.VERSION }}" \ - --notes-file /tmp/changelog.md - - - name: Set up Node.js - if: steps.check.outputs.EXISTS == 'false' - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 (v4.4.0) - with: - node-version: '20' - - - name: Install UltiKits CLI - if: steps.check.outputs.EXISTS == 'false' - run: npm install -g @ultikits/cli - - - name: Publish to UltiCloud - continue-on-error: true - if: steps.check.outputs.EXISTS == 'false' - env: - ULTIKITS_TOKEN: ${{ secrets.ULTIKITS_TOKEN }} - run: | - ultikits publish --yes \ - --module-version "${{ steps.version.outputs.VERSION }}" \ - --changelog "$(cat /tmp/changelog.md)" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7487714..67a3c15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,15 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). 本文件记录本项目的所有重要更改,格式基于 [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)。 -## [Unreleased] +## [2.0.0] - 2026-10-21 ### Changed +- Require the released UltiTools-API 6.3.0 dependency. This is an independent MAJOR upgrade from + the served 1.0.0 line: the module's UltiTools API level rises from 620 to 630, so operators must + upgrade the framework before replacing the module JAR. The catalogue identity remains `ultibackup`. +- 要求使用已发布的 UltiTools-API 6.3.0 依赖。这是相对于当前提供的 1.0.0 版本线的独立主版本升级:模块的 UltiTools API + 级别从 620 升至 630,因此管理员必须先升级框架,再替换模块 JAR。模块目录中的标识仍为 `ultibackup`。 - Automatic backups now follow a new key, `auto_backup.interval_seconds` in `config/backup.yml`, in seconds (default 1800, the same 30 minutes as before; 1 to 107374182). The interval is scheduled by UltiTools 6.3.0's config-bound scheduling: a changed value applies at `/ul reload` without moving the next backup earlier or later @@ -28,15 +33,14 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `auto_backup.interval_seconds`。旧键仍按 1-1440 校验,超出范围的值仍会使模块被拒绝加载(见 README 的已知限制)。 服务器已有的配置文件会在首次启动时加入带默认值的新键,其中已有的内容不会改变。 -- This version requires UltiTools 6.3.0 or later and declares `api-version: 630` in `plugin.yml` (it was `621`). +- This version requires UltiTools 6.3.0 or later and declares `api-version: 630` in `plugin.yml` (the released 1.0.0 declared `620`). The config-bound scheduling above exists only from UltiTools 6.3.0: an older framework would ignore it and run the automatic backup once at load instead of on the interval, so an older framework now refuses to load the - module and logs a warning instead. The README's framework minimum and its server and Java badges now say - UltiTools 6.3.0+, Paper 1.21+ and Java 21+ (UltiKits/UltiTools-Reborn#544). -- 本版本需要 UltiTools 6.3.0 或更高版本,并在 `plugin.yml` 中声明 `api-version: 630`(原为 `621`)。上述配置绑定调度 + module and logs a warning instead. The README's framework minimum now says UltiTools 6.3.0+ + (UltiKits/UltiTools-Reborn#544). +- 本版本需要 UltiTools 6.3.0 或更高版本,并在 `plugin.yml` 中声明 `api-version: 630`(已发布的 1.0.0 声明的是 `620`)。上述配置绑定调度 只在 UltiTools 6.3.0 及以上存在:更早的框架会忽略它,只在加载时执行一次自动备份而不是按间隔执行,因此现在更早的框架会 - 拒绝加载本模块并记录一条警告。README 中的框架最低版本以及服务端与 Java 徽章已改为 UltiTools 6.3.0+、Paper 1.21+、 - Java 21+(UltiKits/UltiTools-Reborn#544)。 + 拒绝加载本模块并记录一条警告。README 中的框架最低版本已改为 UltiTools 6.3.0+(UltiKits/UltiTools-Reborn#544)。 - `plugin.yml` now declares `identify-string: ultibackup`, the key of this module's entry in the UltiCloud catalogue. The framework's update check and `/upm update` skip a module that does not declare it, so this module diff --git a/pom.xml b/pom.xml index 0c13edc..a80a2f2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.ultikits.plugins UltiBackup - 1.0.0 + 2.0.0 jar UltiBackup @@ -45,7 +45,7 @@ com.ultikits UltiTools-API - 6.3.0-SNAPSHOT + 6.3.0 provided