mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-09 01:16:50 +08:00
fix: allow publishing collector artifacts manually
This commit is contained in:
@@ -2,6 +2,11 @@ name: Site Adapter Collector
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release_tag:
|
||||||
|
description: Existing release tag to receive collector assets; leave empty for artifacts only
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- published
|
- published
|
||||||
@@ -105,7 +110,7 @@ jobs:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Upload collectors to release
|
name: Upload collectors to release
|
||||||
if: github.event_name == 'release' && github.event.action == 'published'
|
if: github.event_name == 'release' || inputs.release_tag != ''
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -123,6 +128,7 @@ jobs:
|
|||||||
- name: Upload assets to published release
|
- name: Upload assets to published release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
|
||||||
run: |
|
run: |
|
||||||
|
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" >/dev/null
|
||||||
gh release upload "$RELEASE_TAG" release-assets/* --clobber --repo "$GITHUB_REPOSITORY"
|
gh release upload "$RELEASE_TAG" release-assets/* --clobber --repo "$GITHUB_REPOSITORY"
|
||||||
|
|||||||
@@ -33,4 +33,4 @@ chmod +x moviepilot-site-collector-linux
|
|||||||
|
|
||||||
## 维护者发布流程
|
## 维护者发布流程
|
||||||
|
|
||||||
`.github/workflows/site-adapter-collector.yml` 支持手动触发,也会在 Release 发布后自动构建 Windows、macOS 和 Linux 单文件程序。每个平台先执行 `--help` 启动检查,再上传程序及 SHA-256 摘要为 Workflow Artifact;Release 事件会在三个平台全部成功后,用 GitHub CLI 把同一组文件附加到触发本次任务的 Release。
|
`.github/workflows/site-adapter-collector.yml` 支持手动触发,也会在 Release 发布后自动构建 Windows、macOS 和 Linux 单文件程序。每个平台先执行 `--help` 启动检查,再上传程序及 SHA-256 摘要为 Workflow Artifact。Release 事件会在三个平台全部成功后,把文件附加到触发本次任务的 Release;手动触发时填写已有的 `release_tag` 也会上传到该 Release,留空则只生成 3 天的测试 Artifact。
|
||||||
|
|||||||
Reference in New Issue
Block a user