feat(ci): allow triggering release manually from GitHub Actions UI

Add tag input to workflow_dispatch so releases can be created from the
Actions tab without pushing a new tag. Useful for creating releases from
tags that already exist on the fork.

https://claude.ai/code/session_01M6d5atbWjuLTj6UwRHoK5m
This commit is contained in:
Claude 2026-05-18 20:27:30 +00:00
parent aa90303d92
commit c343f6fac9
No known key found for this signature in database

View file

@ -2,6 +2,11 @@ name: Release 3X-UI
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag name to release (e.g. v3.0.1)'
required: true
type: string
push:
branches:
- "**"
@ -156,10 +161,10 @@ jobs:
- name: Upload files to GH release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
file: x-ui-linux-${{ matrix.platform }}.tar.gz
asset_name: x-ui-linux-${{ matrix.platform }}.tar.gz
overwrite: true
@ -268,10 +273,10 @@ jobs:
- name: Upload files to GH release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
file: x-ui-windows-amd64.zip
asset_name: x-ui-windows-amd64.zip
overwrite: true