Fix release workflow: remove paths filter, add workflow_dispatch tag input

- Remove paths filter so tag pushes always trigger builds
- Remove branch push triggers (only tags trigger builds now)
- Add optional tag input to workflow_dispatch for manual releases
- Update upload steps to work with workflow_dispatch + tag input
- This fixes the issue where release only contained source code

https://claude.ai/code/session_01RQBndg4ZPmYAToK4KKcBzp
This commit is contained in:
Claude 2026-02-17 10:47:39 +00:00
parent bcf1ed20e7
commit 764311a94c
No known key found for this signature in database

View file

@ -2,25 +2,16 @@ name: Release 3X-UI
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to upload release assets to (e.g. v2.6.1-tt). Leave empty to build without uploading.'
required: false
type: string
release:
types: [published]
push:
branches:
- main
- claude/add-trusttunnel-protocol-vZFzn
tags:
- "v*.*.*"
paths:
- '**.js'
- '**.css'
- '**.html'
- '**.sh'
- '**.go'
- 'go.mod'
- 'go.sum'
- 'x-ui.service.debian'
- 'x-ui.service.arch'
- 'x-ui.service.rhel'
jobs:
build:
@ -142,11 +133,12 @@ jobs:
- name: Upload files to GH release
uses: svenstaro/upload-release-action@v2
if: |
(github.event_name == 'release' && github.event.action == 'published') ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
github.event_name == 'release' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
tag: ${{ github.event.inputs.tag || github.ref }}
file: x-ui-linux-${{ matrix.platform }}.tar.gz
asset_name: x-ui-linux-${{ matrix.platform }}.tar.gz
overwrite: true
@ -239,11 +231,12 @@ jobs:
- name: Upload files to GH release
uses: svenstaro/upload-release-action@v2
if: |
(github.event_name == 'release' && github.event.action == 'published') ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
github.event_name == 'release' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
tag: ${{ github.event.inputs.tag || github.ref }}
file: x-ui-windows-amd64.zip
asset_name: x-ui-windows-amd64.zip
overwrite: true