Skip to content

Commit bb66d89

Browse files
committed
chore: Java 插件改为普通插件身份,去掉发布者签名
Lithe 不再区分官方插件和普通插件。Java 插件和 Cargo、Maven、Gradle 一样 使用 io.github.lithe-idea.* 身份,不带发布者签名,由 Lithe Store 自动收录。 - 插件 ID 从 dev.lithe.plugin.java-support 改为 io.github.lithe-idea.java-support, 包目录随之改名;vendor 改为 Lithe Community(signatureRequirement: none), 删除 bundledSignatureRequirement 和 requires.packageTrust - 删除签名链路:scripts/host-tools.sh、host-tools.lock.json、构建和归档里的 签名器与官方校验器调用;CI 和发布不再需要 Xcode 和签名密钥 - build-package.sh 只接受 --arch,组装后直接校验;archive-package.sh 输出 dist/Lithe-Java-Support-<版本>-darwin-<arm64|x64>.zip 和 .sha256,解包后再校验 - verify-package.sh 要求 vendor.signatureRequirement 为 none、包内没有签名文件, 保留 JDK 上游 Apple 代码签名检查 - CI 的打包任务在 Draft PR 上跳过;发布仍为预发布,发布说明改为中文 - 测试里的插件 ID 改为 io.github.lithe-idea.*;repository_pins 断言新身份 - README、MIGRATION、NOTICE 同步新身份、收录方式和转正式发布前的两条宿主限制
1 parent 10d652d commit bb66d89

40 files changed

Lines changed: 280 additions & 344 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ jobs:
4646
- uses: actions/checkout@v4
4747
with:
4848
persist-credentials: false
49-
# The host tools build with the Swift compiler of the pinned Lithe
50-
# revision; scripts/host-tools.sh --require-pinned-swift checks it.
51-
- name: Select Xcode 26.6
52-
uses: maxim-lobanov/setup-xcode@v1
53-
with:
54-
xcode-version: "26.6"
5549
# Downloads are named by their SHA-256 and verified again before use.
5650
- name: Restore verified third-party downloads
5751
uses: actions/cache@v4
@@ -60,23 +54,17 @@ jobs:
6054
.artifacts/jdtls-downloads
6155
.artifacts/jdk-downloads
6256
key: third-party-${{ hashFiles('third_party/*/manifest.json') }}
63-
- name: Build the Lithe package tools
64-
id: host-tools
65-
run: echo "bin=$(scripts/host-tools.sh --require-pinned-swift)" >> "$GITHUB_OUTPUT"
6657
- name: Build, verify and archive both architectures
67-
env:
68-
HOST_TOOLS: ${{ steps.host-tools.outputs.bin }}
6958
run: |
7059
set -euo pipefail
7160
for arch in arm64 x86_64; do
72-
package=$(scripts/build-package.sh --arch "$arch" --host-tools "$HOST_TOOLS")
73-
scripts/archive-package.sh --package "$package" --arch "$arch" \
74-
--development-unsigned --host-tools "$HOST_TOOLS"
61+
package=$(scripts/build-package.sh --arch "$arch")
62+
scripts/archive-package.sh --package "$package" --arch "$arch"
7563
done
76-
- name: Upload the unsigned development archives
64+
- name: Upload the archives
7765
uses: actions/upload-artifact@v4
7866
with:
79-
name: java-support-unsigned
67+
name: java-support-archives
8068
path: dist/
8169
retention-days: 7
8270
if-no-files-found: error

‎.github/workflows/release.yml‎

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
name: Release
22

33
# Push a tag v<version> matching plugin.json to publish a GitHub Release with
4-
# one publisher-signed archive per macOS architecture and its SHA-256 file.
4+
# one unsigned plugin archive per macOS architecture and its SHA-256 file.
55
#
6-
# Only the "Sign, archive and publish" step receives the signing key; the
7-
# steps before it build and verify unsigned packages. Checkouts do not keep
8-
# the workflow token.
6+
# No step receives a signing key. Checkouts do not keep the workflow token.
97
#
10-
# Releases are published as pre-releases: Lithe still bundles Java Support and
11-
# lists it from its own official index (see MIGRATION.md). Remove --prerelease
12-
# below once the official index lists this repository's releases.
8+
# Releases stay pre-releases, which Lithe Store's tracker skips, for two
9+
# reasons:
10+
# 1. Lithe still bundles Java Support under the old ID
11+
# dev.lithe.plugin.java-support.
12+
# 2. Current Lithe hosts reserve languageServers[].hostIntegration (the JDT
13+
# integration) to dev.lithe.* plugin IDs and accept the short tool ID
14+
# "java" only from verified official provenance, so they reject this
15+
# package.
16+
# Remove --prerelease below once a stable Lithe accepts the package (stage E in
17+
# MIGRATION.md) and stops bundling Java Support. The Store then lists stable
18+
# releases of this repository automatically.
1319
on:
1420
push:
1521
tags: ["v*"]
@@ -56,41 +62,34 @@ jobs:
5662
- name: Check the tag matches plugin.json
5763
run: |
5864
set -euo pipefail
59-
version=$(plutil -extract version raw -o - dev.lithe.plugin.java-support/plugin.json)
65+
version=$(plutil -extract version raw -o - io.github.lithe-idea.java-support/plugin.json)
6066
if [[ "$GITHUB_REF_NAME" != "v$version" ]]; then
6167
echo "::error::Tag $GITHUB_REF_NAME does not match plugin.json version $version"
6268
exit 1
6369
fi
64-
- name: Select Xcode 26.6
65-
uses: maxim-lobanov/setup-xcode@v1
66-
with:
67-
xcode-version: "26.6"
68-
- name: Build the Lithe package tools
69-
id: host-tools
70-
run: echo "bin=$(scripts/host-tools.sh --require-pinned-swift)" >> "$GITHUB_OUTPUT"
7170
- name: Build and verify both architectures
72-
env:
73-
HOST_TOOLS: ${{ steps.host-tools.outputs.bin }}
7471
run: |
7572
set -euo pipefail
7673
for arch in arm64 x86_64; do
77-
scripts/build-package.sh --arch "$arch" --host-tools "$HOST_TOOLS"
74+
scripts/build-package.sh --arch "$arch"
7875
done
79-
- name: Sign, archive and publish
76+
- name: Archive and publish
8077
env:
81-
HOST_TOOLS: ${{ steps.host-tools.outputs.bin }}
82-
LITHE_PLUGIN_PACKAGE_PRIVATE_KEY: ${{ secrets.LITHE_PLUGIN_PACKAGE_PRIVATE_KEY }}
8378
GH_TOKEN: ${{ github.token }}
8479
run: |
8580
set -euo pipefail
8681
checksums="$RUNNER_TEMP/checksums.txt"
8782
: > "$checksums"
8883
for arch in arm64 x86_64; do
89-
scripts/archive-package.sh --package ".artifacts/package/$arch/dev.lithe.plugin.java-support" \
90-
--arch "$arch" --sign --host-tools "$HOST_TOOLS" >> "$checksums"
84+
scripts/archive-package.sh --package ".artifacts/package/$arch/io.github.lithe-idea.java-support" \
85+
--arch "$arch" >> "$checksums"
9186
done
9287
{
93-
echo "Lithe 官方 Java 插件 dev.lithe.plugin.java-support ${GITHUB_REF_NAME#v}。每个 macOS 架构一个经发布者签名的归档,附 SHA-256 文件。"
88+
echo "Java Support(\`io.github.lithe-idea.java-support\`)${GITHUB_REF_NAME#v}。每个 macOS 架构一个归档,附 SHA-256 文件。"
89+
echo
90+
echo "兼容性:目前的 Lithe 仍内置 Java Support,并且只允许 \`dev.lithe.*\` 插件使用 JDT 宿主集成和短工具 ID \`java\`,所以会拒绝安装这个包;要等 Lithe 主仓库完成 Java 拆分的阶段 E。"
91+
echo
92+
echo "安装:预发布版本,Lithe Store 自动追踪会跳过。宿主支持后下载对应架构的 ZIP,在 设置 → 插件 的 ⚙ 菜单中选择 从磁盘安装插件…。"
9493
echo
9594
echo "SHA-256:"
9695
echo '```'

0 commit comments

Comments
 (0)