-
Notifications
You must be signed in to change notification settings - Fork 30
Publish the DeepSeek Harness plugin install path #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| name: DeepSeek Harness Plugin Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'dsh-coremate-mobile-v*' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: dsh-plugin-release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| if: github.actor == 'gofenix' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: deepseek-harness-plugin | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Verify release source and version | ||
| shell: bash | ||
| run: | | ||
| git fetch --no-tags origin main | ||
| git merge-base --is-ancestor "$GITHUB_SHA" origin/main | ||
| node --input-type=module <<'NODE' | ||
| import { readFileSync } from 'node:fs' | ||
|
|
||
| const pkg = JSON.parse(readFileSync('package.json', 'utf8')) | ||
| const expectedTag = `dsh-coremate-mobile-v${pkg.version}` | ||
| if (expectedTag !== process.env.GITHUB_REF_NAME) { | ||
| throw new Error(`tag ${process.env.GITHUB_REF_NAME} does not match ${expectedTag}`) | ||
| } | ||
| const installer = readFileSync('skills/opengui-coremate-install/scripts/install-macos.sh', 'utf8') | ||
| const skill = readFileSync('skills/opengui-coremate-install/SKILL.md', 'utf8') | ||
| const agent = readFileSync('skills/opengui-coremate-install/agents/openai.yaml', 'utf8') | ||
| if (!installer.includes(`release_version="${pkg.version}"`)) throw new Error('installer version is out of sync') | ||
| if (!skill.includes(`OpenGUI v${pkg.version} release`)) throw new Error('Skill version is out of sync') | ||
| if (!agent.includes(`OpenGUI v${pkg.version}`)) throw new Error('Skill agent version is out of sync') | ||
| NODE | ||
|
|
||
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | ||
| with: | ||
| version: 11.19.0 | ||
|
|
||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 22.19.0 | ||
| cache: pnpm | ||
| cache-dependency-path: deepseek-harness-plugin/pnpm-lock.yaml | ||
|
|
||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run check | ||
|
|
||
| - name: Pack and verify the only release artifact | ||
| shell: bash | ||
| run: | | ||
| rm -rf release-assets | ||
| mkdir release-assets | ||
| archive="dsh-coremate-mobile-$(node -p "require('./package.json').version").tgz" | ||
| npm pack --pack-destination release-assets | ||
| test -f "release-assets/$archive" | ||
| test "$(find release-assets -maxdepth 1 -type f | wc -l | tr -d ' ')" = 1 | ||
| tar -tzf "release-assets/$archive" > "$RUNNER_TEMP/archive-files.txt" | ||
| tar -tvzf "release-assets/$archive" > "$RUNNER_TEMP/archive-verbose.txt" | ||
| grep -Fx 'package/lib/index.js' "$RUNNER_TEMP/archive-files.txt" | ||
| grep -Fx 'package/cordis.patch.yml' "$RUNNER_TEMP/archive-files.txt" | ||
| grep -Fx 'package/assets/platform-tools/win32-x64/adb.exe' "$RUNNER_TEMP/archive-files.txt" | ||
| grep -Fx 'package/assets/platform-tools/win32-x64/AdbWinApi.dll' "$RUNNER_TEMP/archive-files.txt" | ||
| grep -Fx 'package/assets/platform-tools/win32-x64/AdbWinUsbApi.dll' "$RUNNER_TEMP/archive-files.txt" | ||
| grep -E '^-rwxr-xr-x .* package/assets/platform-tools/darwin/adb$' "$RUNNER_TEMP/archive-verbose.txt" | ||
| grep -E '^-rwxr-xr-x .* package/assets/platform-tools/linux-x64/adb$' "$RUNNER_TEMP/archive-verbose.txt" | ||
| ( | ||
| cd release-assets | ||
| sha256sum "$archive" > "$archive.sha256" | ||
| ) | ||
|
|
||
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: dsh-coremate-mobile-release-assets | ||
| path: deepseek-harness-plugin/release-assets/ | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: dsh-coremate-mobile-release-assets | ||
| path: release-assets | ||
|
|
||
| - name: Create or finish the public GitHub Release | ||
| shell: bash | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| run: | | ||
| version="${GITHUB_REF_NAME#dsh-coremate-mobile-v}" | ||
| archive="dsh-coremate-mobile-${version}.tgz" | ||
| checksum="${archive}.sha256" | ||
| test -f "release-assets/$archive" | ||
| test -f "release-assets/$checksum" | ||
| test "$(find release-assets -maxdepth 1 -type f | wc -l | tr -d ' ')" = 2 | ||
|
|
||
| tag_type="$(gh api "repos/${GH_REPO}/git/ref/tags/${GITHUB_REF_NAME}" --jq .object.type)" | ||
| tag_sha="$(gh api "repos/${GH_REPO}/git/ref/tags/${GITHUB_REF_NAME}" --jq .object.sha)" | ||
| if [[ "$tag_type" == tag ]]; then | ||
| tag_sha="$(gh api "repos/${GH_REPO}/git/tags/${tag_sha}" --jq .object.sha)" | ||
| fi | ||
| [[ "$tag_sha" == "$GITHUB_SHA" ]] | ||
|
|
||
| if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then | ||
| draft="$(gh api "repos/${GH_REPO}/releases/tags/${GITHUB_REF_NAME}" --jq .draft)" | ||
| if [[ "$draft" != true ]]; then | ||
| assets="$(gh release view "$GITHUB_REF_NAME" --json assets --jq '.assets[].name' | sort)" | ||
| expected="$(printf '%s\n%s\n' "$archive" "$checksum" | sort)" | ||
| [[ "$assets" == "$expected" ]] | ||
| mkdir "$RUNNER_TEMP/published-assets" | ||
| gh release download "$GITHUB_REF_NAME" \ | ||
| --pattern "$archive" \ | ||
| --pattern "$checksum" \ | ||
| --dir "$RUNNER_TEMP/published-assets" | ||
| cmp "release-assets/$archive" "$RUNNER_TEMP/published-assets/$archive" | ||
| cmp "release-assets/$checksum" "$RUNNER_TEMP/published-assets/$checksum" | ||
| exit 0 | ||
| fi | ||
| else | ||
| notes="$RUNNER_TEMP/dsh-release-notes.md" | ||
| cat > "$notes" <<EOF | ||
| OpenGUI plugin for DeepSeek Harness v${version}. | ||
|
|
||
| Download both the \`.tgz\` package and its \`.sha256\` file. The recommended macOS path is the [Codex installer Skill](https://github.com/Core-Mate/OpenGUI/tree/${GITHUB_REF_NAME}/deepseek-harness-plugin/skills/opengui-coremate-install). | ||
|
|
||
| The plugin supports \`/opengui\`, \`@OpenGUI\`, delegated phone and browser tasks, multi-device selection, and read-only phone mirroring. It requires DeepSeek Harness \`0.1.0-rc.7\` and a model with image input and tool calling. | ||
| EOF | ||
| gh release create "$GITHUB_REF_NAME" --draft --verify-tag \ | ||
| --title "dsh-coremate-mobile v${version}" \ | ||
| --notes-file "$notes" | ||
| fi | ||
|
|
||
| gh release upload "$GITHUB_REF_NAME" \ | ||
| "release-assets/$archive" \ | ||
| "release-assets/$checksum" \ | ||
| --clobber | ||
| assets="$(gh release view "$GITHUB_REF_NAME" --json assets --jq '.assets[].name' | sort)" | ||
| expected="$(printf '%s\n%s\n' "$archive" "$checksum" | sort)" | ||
| [[ "$assets" == "$expected" ]] | ||
| gh release edit "$GITHUB_REF_NAME" --draft=false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当发布标签由
gofenix之外的维护者、GitHub App 或自动化账号推送时,这个 job 会直接被标记为 skipped,依赖它的publishjob 也不会运行;标签已经存在后,合并或重新运行工作流也不会重新触发push.tags事件。因此仓库文档指向的安装包可能永远不会生成,除非始终由这个单一账号创建每个标签。应改用受保护环境、权限或显式授权名单控制发布,而不是把发布流程绑定到一个用户名。Useful? React with 👍 / 👎.