mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-27 20:53:01 +00:00
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:
parent
bcf1ed20e7
commit
764311a94c
1 changed files with 13 additions and 20 deletions
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue