mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
chore: 简化版本字符串提取
使用了正则表达式的正向先行断言
This commit is contained in:
parent
ba12d86bb8
commit
678ff1d9e4
1 changed files with 1 additions and 4 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
|
@ -49,10 +49,7 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: |
|
||||
$versionString =
|
||||
if ("${{ steps.tag.outputs.tag }}" -eq "") { "" }
|
||||
elseif ("${{ steps.tag.outputs.tag }}" -match '^v\d') { "${{ steps.tag.outputs.tag }}".Substring(1) }
|
||||
else { "${{ steps.tag.outputs.tag }}" }
|
||||
$versionString = "${{ steps.tag.outputs.tag }}" -replace "^v(?=\d)", ""
|
||||
python scripts/publish.py --compiler=ClangCL --platform=${{ matrix.platform }} --version-major=${{ inputs.major }} --version-minor=${{ inputs.minor }} --version-patch=${{ inputs.patch }} --version-string=$versionString --pfx-path=certs\Magpie.pfx --pfx-password="${{ secrets.MAGPIE_PFX_PASSWORD }}"
|
||||
|
||||
- name: Store artifacts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue