fix: allow publishing collector artifacts manually

This commit is contained in:
jxxghp
2026-07-12 16:37:05 +08:00
parent 8e60e5571b
commit a30a48b8f4
2 changed files with 9 additions and 3 deletions

View File

@@ -2,6 +2,11 @@ name: Site Adapter Collector
on:
workflow_dispatch:
inputs:
release_tag:
description: Existing release tag to receive collector assets; leave empty for artifacts only
required: false
type: string
release:
types:
- published
@@ -105,7 +110,7 @@ jobs:
publish:
name: Upload collectors to release
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'release' || inputs.release_tag != ''
needs:
- build
runs-on: ubuntu-latest
@@ -123,6 +128,7 @@ jobs:
- name: Upload assets to published release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
run: |
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" >/dev/null
gh release upload "$RELEASE_TAG" release-assets/* --clobber --repo "$GITHUB_REPOSITORY"