diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b031967..7a460233 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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