mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
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:
parent
2d491e272c
commit
e40f73cc1c
1 changed files with 10 additions and 12 deletions
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue