ci: remove release trigger, auto-create release on tag push

Remove the duplicate release trigger. Now pushing a tag like v*.*.*
automatically creates a prerelease (if not exists) and uploads the
build artifacts via gh CLI, eliminating the duplicate build issue.
This commit is contained in:
Sora39831 2026-04-02 17:20:33 +08:00
parent 2d491e272c
commit e40f73cc1c

View file

@ -5,8 +5,6 @@ on:
push: push:
tags: tags:
- "v*.*.*" - "v*.*.*"
release:
types: [created]
pull_request: pull_request:
paths: paths:
- '**.js' - '**.js'
@ -181,16 +179,16 @@ jobs:
name: x-ui-linux-${{ matrix.platform }} name: x-ui-linux-${{ matrix.platform }}
path: ./x-ui-linux-${{ matrix.platform }}.tar.gz path: ./x-ui-linux-${{ matrix.platform }}.tar.gz
- name: Upload files to GH release - name: Create release and upload assets
uses: svenstaro/upload-release-action@v2 if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release' env:
with: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} run: |
tag: ${{ github.ref_name }} TAG="${{ github.ref_name }}"
file: x-ui-linux-${{ matrix.platform }}.tar.gz if ! gh release view "$TAG" > /dev/null 2>&1; then
asset_name: x-ui-linux-${{ matrix.platform }}.tar.gz gh release create "$TAG" --prerelease --title "$TAG" --generate-notes
overwrite: true fi
prerelease: true gh release upload "$TAG" x-ui-linux-${{ matrix.platform }}.tar.gz --clobber
# ================================= # =================================
# Windows Build (disabled) # Windows Build (disabled)