Skip to content

Commit

Permalink
ci: run actions with tag (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ba0gu0 authored Jul 13, 2024
1 parent 98fae32 commit 07bff61
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/Release-Linux.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release-Linux

on:
push:
tags:
- "v*.*.*" # 监听所有以 'v' 开头的标签
workflow_dispatch:
inputs:
tag_name:
Expand Down Expand Up @@ -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 }}
7 changes: 5 additions & 2 deletions .github/workflows/Release-Macos.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release-Macos

on:
push:
tags:
- "v*.*.*" # 监听所有以 'v' 开头的标签
workflow_dispatch:
inputs:
tag_name:
Expand Down Expand Up @@ -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 }}
17 changes: 10 additions & 7 deletions .github/workflows/Release-Windows.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release-Windows

on:
push:
tags:
- "v*.*.*" # 监听所有以 'v' 开头的标签
workflow_dispatch:
inputs:
tag_name:
Expand Down Expand Up @@ -40,7 +43,7 @@ jobs:
- name: Install dependencies
shell: pwsh
run: |
$retries = 5
$retries = 1
$count = 0
do {
yarn install
Expand All @@ -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'
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 07bff61

Please sign in to comment.