diff --git a/.github/workflows/Release-Linux.yaml b/.github/workflows/Release-Linux.yaml index 119115b..0ca4d83 100644 --- a/.github/workflows/Release-Linux.yaml +++ b/.github/workflows/Release-Linux.yaml @@ -1,6 +1,9 @@ name: Release-Linux on: + push: + tags: + - "v*.*.*" # 监听所有以 'v' 开头的标签 workflow_dispatch: inputs: tag_name: @@ -91,15 +94,15 @@ jobs: - name: Create and Upload Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.inputs.tag_name }} - name: ${{ env.ASSET_RPM_BASENAME }} + tag_name: ${{ github.event.inputs.tag_name || github.ref_name }} + name: ${{ github.event.inputs.tag_name || github.ref_name }} files: ${{ env.ASSET_RPM_PATH }} token: ${{ secrets.GITHUB_TOKEN }} - name: Create and Upload Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.inputs.tag_name }} - name: ${{ env.ASSET_DEB_BASENAME }} + tag_name: ${{ github.event.inputs.tag_name || github.ref_name }} + name: ${{ github.event.inputs.tag_name || github.ref_name }} files: ${{ env.ASSET_DEB_PATH }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Release-Macos.yaml b/.github/workflows/Release-Macos.yaml index de7eb2a..8e59ac5 100644 --- a/.github/workflows/Release-Macos.yaml +++ b/.github/workflows/Release-Macos.yaml @@ -1,6 +1,9 @@ name: Release-Macos on: + push: + tags: + - "v*.*.*" # 监听所有以 'v' 开头的标签 workflow_dispatch: inputs: tag_name: @@ -72,7 +75,7 @@ jobs: - name: Create and Upload Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.inputs.tag_name }} - name: ${{ env.ASSET_BASENAME }} + tag_name: ${{ github.event.inputs.tag_name || github.ref_name }} + name: ${{ github.event.inputs.tag_name || github.ref_name }} files: ${{ env.ASSET_PATH }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Release-Windows.yaml b/.github/workflows/Release-Windows.yaml index 0cc004a..f55b1d9 100644 --- a/.github/workflows/Release-Windows.yaml +++ b/.github/workflows/Release-Windows.yaml @@ -1,6 +1,9 @@ name: Release-Windows on: + push: + tags: + - "v*.*.*" # 监听所有以 'v' 开头的标签 workflow_dispatch: inputs: tag_name: @@ -40,7 +43,7 @@ jobs: - name: Install dependencies shell: pwsh run: | - $retries = 5 + $retries = 1 $count = 0 do { yarn install @@ -50,12 +53,12 @@ jobs: } $count++ Write-Output "Retrying ($count/$retries)..." - Start-Sleep -Seconds 10 + Start-Sleep -Seconds 5 } while ($count -lt $retries) - - name: Lint code - run: | - yarn lint || (echo "Linting issues found, trying to fix..." && yarn lint-fix) + # - name: Lint code + # run: | + # yarn lint || (echo "Linting issues found, trying to fix..." && yarn lint-fix) - name: Build the project for x64 if: matrix.architecture == 'x64' @@ -124,7 +127,7 @@ jobs: - name: Create and Upload Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.inputs.tag_name }} - name: ${{ env.ASSET_BASENAME }} + tag_name: ${{ github.event.inputs.tag_name || github.ref_name }} + name: ${{ github.event.inputs.tag_name || github.ref_name }} files: ${{ env.ASSET_PATH }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index e6f3771..d6e2968 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,6 @@ "universal-analytics": "^0.5.3", "vite": "^5.2.11" }, - "packageManager": "yarn@4.3.1+sha512.af78262d7d125afbfeed740602ace8c5e4405cd7f4735c08feb327286b2fdb2390fbca01589bfd1f50b1240548b74806767f5a063c94b67e431aabd0d86f7774", + "packageManager": "yarn@1.22.22", "productName": "Debugtron" }