Skip to content

Commit e6c829e

Browse files
committed
版本号读取支持
1 parent d2ed1d3 commit e6c829e

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎.github/workflows/dotnet-desktop_build.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ jobs:
3535
- name: Publish build with 'FolderProfile'
3636
run: dotnet publish -p:PublishProfile=FolderProfile
3737

38+
- name: Get version text #根据version.txt文件获取版本号
39+
shell: pwsh
40+
run: |
41+
$content = Get-Content -Path "${{ github.workspace }}\version.txt" -Raw
42+
echo "VERSION=$content" >> $env:GITHUB_ENV
43+
3844
- name: Upload Artifact
3945
uses: actions/upload-artifact@v4
4046
with:
41-
name: app-${{ matrix.profile }}
47+
name: Release-V${{ env.VERSION }}
4248
path: ${{ github.workspace }}\TimedPower\bin\Release\net8.0-windows10.*\publish\**

‎comment/版本号更新批注.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
更新版本时,版本号需要更新的文件:
2+
3+
```path
4+
/version.txt
5+
/TimedPower/TimedPower.csproj
6+
/nsis/setupScript.nsi
7+
```

‎version.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.9.7.20260330

0 commit comments

Comments
 (0)